|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-changelog
[Xen-changelog] Small patch to avoid a stack overflow (VTI only).
 
# 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 <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |