fix libfsimage integer overflow
PATCH 1/1 fix libfsimage integer overflow
# HG changeset patch
# User [email protected]
# Date 1163194188 28800
# Node ID 7c295303f07f0b80859b8d315e4122f1c44c24fb # Parent b11aa80b24f3300f4f6c04db1621159def33d44c Fix integer overflow problem with libfsimage grub plugins.
Signed-off-by John Levon <[email protected]>
tools/libfsimage/common/fsimage_grub.c +1 -1
@@ -126,7 +126,7 @@ fsig_devread(fsi_file_t *ffi, unsigned i 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) {