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).




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: