Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Arguments to sizeof aren’t actually evaluated (except for variably-modified-types, AKA VLAs, but don’t use those).


Please use those. They are useful, make code clearer, improve bounds checking, ...

Don't let attackers influence the size of a buffer (neither for VLAs nor for heap allocations).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: