$OpenBSD: patch-ext_bigdecimal_bigdecimal_c,v 1.1 2011/05/25 18:20:43 jasper Exp $

Security fix for CVE-2011-0188
Ruby BigDecimal Integer Truncation Vulnerability

Fix from upstream svn:
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=30993

--- ext/bigdecimal/bigdecimal.c.orig	Sat May  8 04:07:43 2010
+++ ext/bigdecimal/bigdecimal.c	Wed May 25 19:50:01 2011
@@ -2123,7 +2123,7 @@ static int gnAlloc=0; /* Memory allocation counter */
 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);
     }
