[前][次][番号順一覧][スレッド一覧]

ruby-changes:7327

From: mame <ko1@a...>
Date: Tue, 26 Aug 2008 00:06:18 +0900 (JST)
Subject: [ruby-changes:7327] Ruby:r18846 (trunk): * ext/bigdecimal/bigdecimal.c (VpMult): fix double free.

mame	2008-08-26 00:03:14 +0900 (Tue, 26 Aug 2008)

  New Revision: 18846

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18846

  Log:
    * ext/bigdecimal/bigdecimal.c (VpMult): fix double free.

  Modified files:
    trunk/ChangeLog
    trunk/ext/bigdecimal/bigdecimal.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18845)
+++ ChangeLog	(revision 18846)
@@ -1,3 +1,7 @@
+Tue Aug 26 00:02:49 2008  Yusuke Endoh  <mame@t...>
+
+	* ext/bigdecimal/bigdecimal.c (VpMult): fix double free.
+
 Mon Aug 25 23:59:36 2008  Tanaka Akira  <akr@f...>
 
 	* transcode.c (rb_econv_open): make last_tc NULL if there are only
Index: ext/bigdecimal/bigdecimal.c
===================================================================
--- ext/bigdecimal/bigdecimal.c	(revision 18845)
+++ ext/bigdecimal/bigdecimal.c	(revision 18846)
@@ -3165,7 +3165,7 @@
 
     c->exponent = a->exponent;    /* set exponent */
     if(!AddExponent(c,b->exponent)) {
-	VpFree(c);
+	if(w) VpFree(c);
 	return 0;
     }
     VpSetSign(c,VpGetSign(a)*VpGetSign(b));    /* set sign  */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]