4 ms·
Shouldn't be. See the "exit 1" in your link? That's the end of the shell script, and as the OpenBSD link says; > It remains possible to put arbitrary bytes AFT
by eesmith 2y ago
Shouldn't be. See the "exit 1" in your link? That's the end of the shell script, and as the OpenBSD link says;
> It remains possible to put arbitrary bytes AFTER the parts of the
shell script that get parsed & executed (like some Solaris patch files
do). But you can't put arbirary bytes in the middle,
- oguz-ismail 2y agoIt is. Binaries generated by cosmocc have NUL in the middle.
- comex 2y agoAh, indeed. Here are the first 16 bytes of one: 4d 5a 71 46 70 44 3d 27 0a 00 00 10 00 f8 00 00 |MZqFpD='........| There are already nul bytes here, and there are a lot more before the single quote gets closed at offset 0x200.
- eesmith 2y agoAnd I can confirm a NUL in 11th byte of my hello.c a.out: >>> s[:11] b"MZqFpD='\n\n\x00" Looking closer, I missed the content of "BIOS BOOT SECTOR".