Author: shivaram
Date: 2011-12-16 20:45:58 -0500 (Fri, 16 Dec 2011)
New Revision: 3853

Modified:
   trunk/osprey/wgen/wgen_decl.cxx
Log:
Fix for bug #938. realloc is called incorrectly without
considering the object size.

Code Review: Sun Chan


Modified: trunk/osprey/wgen/wgen_decl.cxx
===================================================================
--- trunk/osprey/wgen/wgen_decl.cxx     2011-12-16 23:33:39 UTC (rev 3852)
+++ trunk/osprey/wgen/wgen_decl.cxx     2011-12-17 01:45:58 UTC (rev 3853)
@@ -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