49b4c5f864
Add a sanity check of the disk_buf first three bytes. The original code on a disk with nul bytes was causing integer overflow and thus calling the memcmp(3) functin in is_zero() with enormous length. Verity that the 0th byte is JMP, 1th a signed byte >=9 to prevent overflow and 2th byte NOP. Add a comment explaining the check. Detected with MKSANITIZER and ASan. |
||
---|---|---|
.. | ||
arch | ||
Makefile | ||
bbinfo.c | ||
ext2fs.c | ||
ffs.c | ||
fstypes.c | ||
installboot.8 | ||
installboot.c | ||
installboot.h | ||
machines.c | ||
sum.c |