[syslinux] [PATCH] isohybrid: fix overflow on 32 bit system

H. Peter Anvin hpa at zytor.com
Sun May 11 19:49:37 PDT 2014


On 05/11/2014 06:56 PM, Kai Kang wrote:
> When call isohybrid with option '-u', it overflows on a 32 bits host. It
> seeks to 512 bytes before the end of the image to install gpt header. If
> the size of image is larger than LONG_MAX, it overflows fseek() and
> cause error:
> 
> isohybrid: wrlinux-image-x86-64-20140505110100.iso: seek error - 8: Invalid argument
> 
> Check the offset and call fseek() multi-times if offset is too large.
> 
> Signed-off-by: Kai Kang <kai.kang at windriver.com>

NAK.

The right thing to do is compile it with #define _FILE_OFFSET_BITS 64
and change fseek to fseeko with the appropriate type being off_t.

	-hpa



More information about the Syslinux mailing list