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

It is. Binaries generated by cosmocc have NUL in the middle.


Ah, 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.


And 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".




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

Search: