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

Not a C programmer, why is 0x00 so bad? It's the string terminator character right?


It's a byte like any other. You're more likely to see big files full of 0x0 than 0x1, but it's really not so different.


Indeed, '\0' is the sentinel character for uncounted strings in C, and even if your own counted string implementation is “null-byte clean”, aspects of the underlying system may not be (Windows and Unix filesystems forbid embedded null characters, for example).




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

Search: