File ruby-1.8.x_bigdecimal_memory_corruption.patch of Package ruby.import4584

Index: ext/bigdecimal/bigdecimal.c
===================================================================
--- ext/bigdecimal/bigdecimal.c.orig	2011-05-10 14:14:48.000000000 +0200
+++ ext/bigdecimal/bigdecimal.c	2011-05-10 14:18:53.602468960 +0200
@@ -2026,11 +2026,11 @@ static int gnAlloc=0; /* Memory allocati
 VP_EXPORT void *
 VpMemAlloc(U_LONG mb)
 {
-    void *p = xmalloc((unsigned int)mb);
+    void *p = xmalloc(mb);
     if(!p) {
         VpException(VP_EXCEPTION_MEMORY,"failed to allocate memory",1);
     }
-    memset(p,0,mb);
+    memset(p, 0, mb);
 #ifdef _DEBUG
     gnAlloc++; /* Count allocation call */
 #endif /* _DEBUG */