News for hackers. Stuff that matters.
Re:Sudo Replacement by msla on Friday January 20, 2023 @09:36PM (#34463265)
It depends on the encoding: In UTF-16, a lot of characters have 0x00 as part of their encoding. That's the null byte, even if the software isn't technically supposed to see it that way, so it's a valid test. (Easy, too: Any character that's also in ASCII will be represented with a 0x00 byte in UTF-16.) Of course, UTF-8 solves that problem, plus the problem of surrogate pairs.
Re:Sudo Replacement by fsckboy on Saturday January 21, 2023 @12:34PM (#34468171)
> That's the null byte, even if the software isn't technically supposed to see it that way

that's a null byte, even if the spec says it's not the string terminator.

i just think it's worth referring to things by using words that more precise semantics if possible