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 checking strtab length in xc_core.c

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [Patch] fix checking strtab length in xc_core.c
From: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Date: Mon, 10 Sep 2007 21:16:23 +0900
Delivery-date: Mon, 10 Sep 2007 05:17:32 -0700
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
Hi,

I don't understard the meaning of the following check in xc_core.c.
Is this correct patch?

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>

diff -r 9071521d4864 tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c     Fri Sep 07 11:39:10 2007 +0100
+++ b/tools/libxc/xc_core.c     Tue Sep 11 06:13:55 2007 +0900
@@ -107,7 +107,7 @@ xc_core_strtab_get(struct xc_core_strtab
     if ( strtab->current + len > strtab->max )
     {
         char *tmp;
-        if ( strtab->max * 2 < strtab->max )
+        if ( strtab->current + len > strtab->max * 2 )
         {
             PERROR("too long string table");
             errno = ENOMEM;

Best Regards,

Akio Takebe

Attachment: fix_xc_core_strtab_len.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>