3 ms·
I love $new_C_stuff, but variable-length arrays are generally a security hole waiting to happen. Be very careful before using them.
by comex 14y ago
I love $new_C_stuff, but variable-length arrays are generally a security hole waiting to happen. Be very careful before using them.
- eridius 14y agoWhat do you mean by that? All I can think of is taking user-supplied input as the length of the VLA, but I would hope anyone using VLAs are not stupid enough to think that giving the user control over the size of their stack frame is a good idea.
- comex 14y agoI'd say that most of the time when you want an array whose size is variable, the size relates in some way to user input. Your mileage may vary.