Re:C99 doesn't need function bodies, or 'VLAs are Turing com...
by jasonhansel on Thursday August 04, 2022 @03:50PM
(#32347457)
Doesn't a similar DoS risk (from allowing users to allocate arbitrarily large amounts of memory) also apply to the heap? You shouldn't be giving arbitrary user-supplied ints to malloc either.
[ Parent
| on HN ]
Re:C99 doesn't need function bodies, or 'VLAs are Turing com...
by lelanthran on Thursday August 04, 2022 @04:02PM
(#32347603)
> 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.
Re:C99 doesn't need function bodies, or 'VLAs are Turing com...
by saagarjha on Thursday August 04, 2022 @07:53PM
(#32349800)
VLAs don’t smash the stack.