> + /* Round up to the nearest sector boundary, and zero the extra memory */ > core_img = realloc (core_img, nsec * GRUB_DISK_SECTOR_SIZE); > + assert (core_img && (nsec * GRUB_DISK_SECTOR_SIZE >= core_size)); Can you change that to xrealloc while on it? Other than this, go ahead.