Hacker News new | ask | show | jobs
by lelanthran 1420 days ago
> Doesn't a similar DoS risk (from allowing users to allocate arbitrarily large amounts of memory) also apply to the heap?

DoS Risk? No one cares too much about that - the problem with VLAs is stack smashing, which then allows aribtrary user-supplied code to be executed.

You cannot do that with malloc() and friends.

1 comments

VLAs don’t smash the stack.
Depends on the number you put inside, and the linker settings for stack size.
No.