$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	Wed May 25 19:46:25 2011
+++ ext/bigdecimal/bigdecimal.c	Wed May 25 19:47:42 2011
@@ -2032,7 +2032,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);
     }
