isohybrid: fix overflow on 32 bit system
commitbc360f8dbdf27bff07bb5db8d0ea9a7b10d8e3d1
authorKai Kang <kai.kang@windriver.com>
Fri, 20 Jun 2014 03:32:11 +0000 (20 11:32 +0800)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 20 Jun 2014 03:50:57 +0000 (19 20:50 -0700)
treeba14eb831d003b38bc8fb20243f216b90757c3dd
parent7798fdc99fc5f16a8a1f3f94bb2428908634d5a6
isohybrid: fix overflow on 32 bit system

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: image-x86-64-20140505110100.iso: seek error - 8: Invalid argument

Replace fseek with fseeko to fix this issue.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
utils/isohybrid.c