From: kaf24@localhost.localdomain Date: Sat, 11 Nov 2006 01:17:57 +0000 (+0000) Subject: Fix integer overflow problem with libfsimage grub plugins. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15551^2~20 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=106e6b9de42e32ab8d13ae07c095e8d9ddc4a8f5;p=xen.git Fix integer overflow problem with libfsimage grub plugins. Signed-off-by: John Levon --- diff --git a/tools/libfsimage/common/fsimage_grub.c b/tools/libfsimage/common/fsimage_grub.c index f8c3839328..252445f58e 100644 --- a/tools/libfsimage/common/fsimage_grub.c +++ b/tools/libfsimage/common/fsimage_grub.c @@ -126,7 +126,7 @@ int fsig_devread(fsi_file_t *ffi, unsigned int sector, unsigned int offset, unsigned int bufsize, char *buf) { - uint64_t off = ffi->ff_fsi->f_off + ((uint64_t)(sector * 512)) + offset; + uint64_t off = ffi->ff_fsi->f_off + ((uint64_t)sector * 512) + offset; ssize_t bytes_read = 0; while (bufsize) {