diff options
| author | Kai Kang <kai.kang@windriver.com> | 2014-06-20 14:06:30 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-24 19:53:02 +0100 |
| commit | 41bd9dbf6f3e0add6a9e2cb20cfcbff44d785ea4 (patch) | |
| tree | dfa524eac671be18f4c19bd3908736e7abb5800d /meta/recipes-devtools/syslinux/files | |
| parent | 15dbdfc6a7e3f03862d9c670ffd2ae8f4d9d8b69 (diff) | |
| download | openembedded-core-41bd9dbf6f3e0add6a9e2cb20cfcbff44d785ea4.tar.gz openembedded-core-41bd9dbf6f3e0add6a9e2cb20cfcbff44d785ea4.tar.bz2 openembedded-core-41bd9dbf6f3e0add6a9e2cb20cfcbff44d785ea4.zip | |
syslinux: fix isohybird overflows 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: wrlinux-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: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/syslinux/files')
| -rw-r--r-- | meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch b/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch new file mode 100644 index 0000000000..09a6945ba9 --- /dev/null +++ b/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch @@ -0,0 +1,40 @@ +Upstream-Status: Backport + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From bc360f8dbdf27bff07bb5db8d0ea9a7b10d8e3d1 Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Fri, 20 Jun 2014 11:32:11 +0800 +Subject: [PATCH 1/2] 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 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/isohybrid.c b/utils/isohybrid.c +index 410bb60..23fc6c0 100644 +--- a/utils/isohybrid.c ++++ b/utils/isohybrid.c +@@ -1126,7 +1126,7 @@ main(int argc, char *argv[]) + * end of the image + */ + +- if (fseek(fp, (isostat.st_size + padding) - orig_gpt_size - 512, ++ if (fseeko(fp, (isostat.st_size + padding) - orig_gpt_size - 512, + SEEK_SET)) + err(1, "%s: seek error - 8", argv[0]); + +-- +1.9.1 + |
