4 ms·
If you're wondering why this is useful, the reason is buffer overflow exploits. Strings in C are null-terminated, so having a null in your code may stop it from
by Rarebox 11y ago
If you're wondering why this is useful, the reason is buffer overflow exploits. Strings in C are null-terminated, so having a null in your code may stop it from getting copied.
- userbinator 11y agoI think obfuscation is another reason, since the classic "xor reg, reg" (31 C0 is xor eax, eax) does not have any nulls either.
- ithkuil 11y agoyeah, nor it does on x64_64 since it's the same encoding but prefixed by a REX: `48 31 c0 xor %rax,%rax`