Hacker News new | ask | show | jobs
by wormlord 693 days ago
Not a C programmer, why is 0x00 so bad? It's the string terminator character right?
2 comments

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