bsdinstall(8): partedit can hang/crash on read/lseek/malloc failures
This fixes a few problems:
- if lseek(2) fails, bootsize underflows to SIZE_T_MAX, making the resulting allocation dangerous
- if malloc(3) fails, we end up with a null pointer deref later
- if read(2) fails, the installer will hang trying to read(2) boot loader code