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-changelog

[Xen-changelog] Small patch to avoid a stack overflow (VTI only).

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Small patch to avoid a stack overflow (VTI only).
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Dec 2005 20:42:08 +0000
Delivery-date: Wed, 21 Dec 2005 20:45:26 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User djm@xxxxxxxxxxxxxxx
# Node ID dda94d6dce94447d29eaf64c53e6e6315e4ac96e
# Parent  5eb7ca1878bdf872d9d2d5c18fd42d7d3f9bedc3
Small patch to avoid a stack overflow (VTI only).
Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>

diff -r 5eb7ca1878bd -r dda94d6dce94 tools/libxc/xc_ia64_stubs.c
--- a/tools/libxc/xc_ia64_stubs.c       Wed Dec 14 19:02:37 2005
+++ b/tools/libxc/xc_ia64_stubs.c       Thu Dec 15 20:51:10 2005
@@ -182,18 +182,26 @@
 
 int xc_ia64_build_hob(int xc_handle, uint32_t dom, unsigned long memsize){
 
-    char   hob_buf[GFW_HOB_SIZE];
+    char   *hob_buf;
+
+    hob_buf = malloc (GFW_HOB_SIZE);
+    if (hob_buf == NULL) {
+        PERROR("Could not allocate hob");
+        return -1;
+    }
 
     if ( build_hob( hob_buf, GFW_HOB_SIZE, memsize<<20) < 0){
+        free (hob_buf);
         PERROR("Could not build hob");
         return -1;
     }
 
     if ( load_hob( xc_handle, dom, hob_buf) <0){
+        free (hob_buf);
         PERROR("Could not load hob");
        return -1;
     }
-
+    free (hob_buf);
     return 0;
 
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Small patch to avoid a stack overflow (VTI only)., Xen patchbot -unstable <=