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

Re: [Xen-devel] libxc/load_aou9.c signness fix gcc4

To: Jerone Young <jyoung5@xxxxxxxxxx>
Subject: Re: [Xen-devel] libxc/load_aou9.c signness fix gcc4
From: Tim Newsham <newsham@xxxxxxxx>
Date: Fri, 24 Jun 2005 10:35:24 -1000 (HST)
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 24 Jun 2005 20:34:21 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1119644189.2747.6.camel@thinkpad>
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>
References: <1119644189.2747.6.camel@thinkpad>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
another gcc sign fix.

This fix is bad.  The proper fix is to add a cast.
An unsigned buffer will result in incorrect extraction
of big-endian values.

-struct Exec *get_header(unsigned char *, unsigned long, struct Exec *);
+struct Exec *get_header(char *, unsigned long, struct Exec *);

struct Exec *
get_header(
-    unsigned char *image,
+    char *image,
    unsigned long image_size,
    struct Exec *ehdr)

Jerone Young
jyoung5@xxxxxxxxxx

Tim Newsham
http://www.lava.net/~newsham/

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

<Prev in Thread] Current Thread [Next in Thread>