Hacker News new | ask | show | jobs
by loup-vaillant 2944 days ago
> You say that as if it’s entirely the responsibility of the programmer to avoid these bear traps that have been left lying around everywhere.

Oh no no no, I was picking on hermitdev's characterisation of the behaviour. Sure, what the compiler does with the padding bytes is unspecified. But it can still lead to undefined behaviour, if some unwary user ever reads them. A misinterpretation like that, and poof you get a security vulnerability. The C standard is insane.

1 comments

Aha, sorry, I misunderstood! Glad to hear you’re on the side of sanity. :)