WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] fix libfsimage integer overflow

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] fix libfsimage integer overflow
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Fri, 10 Nov 2006 21:31:22 +0000
Delivery-date: Fri, 10 Nov 2006 13:31:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1163194188 28800
# Node ID 7c295303f07f0b80859b8d315e4122f1c44c24fb
# Parent  b11aa80b24f3300f4f6c04db1621159def33d44c
Fix integer overflow problem with libfsimage grub plugins.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/tools/libfsimage/common/fsimage_grub.c 
b/tools/libfsimage/common/fsimage_grub.c
--- a/tools/libfsimage/common/fsimage_grub.c
+++ b/tools/libfsimage/common/fsimage_grub.c
@@ -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) {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fix libfsimage integer overflow, John Levon <=