Hi,

  Could a gatekeeper please review the attached patch for Bug 938?

      https://bugs.open64.net/show_bug.cgi?id=938

  The realloc statement is incorrectly called without considering the object 
size. This patch fixes this.

Thanks,
Shivaram

Index: osprey/wgen/wgen_decl.cxx
===================================================================
--- osprey/wgen/wgen_decl.cxx   (revision 3851)
+++ osprey/wgen/wgen_decl.cxx   (working copy)
@@ -227,7 +227,8 @@
   func_decl_stack_top++;
   if (func_decl_stack_top == func_decl_stack_size) {
     func_decl_stack_size++;
-    func_decl_stack = (gs_t *)realloc(func_decl_stack, func_decl_stack_size);
+    func_decl_stack = (gs_t *)realloc(func_decl_stack, 
+                                     func_decl_stack_size * sizeof(gs_t));
   }
   func_decl_stack[func_decl_stack_top] = decl;
 }
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to