]> granicus.if.org Git - php/commitdiff
- Fixed bug #62525 (sigabrt while converting floating point to string)
authorFelipe Pena <felipensp@gmail.com>
Sat, 14 Jul 2012 18:15:11 +0000 (15:15 -0300)
committerFelipe Pena <felipensp@gmail.com>
Sat, 14 Jul 2012 18:15:11 +0000 (15:15 -0300)
main/snprintf.c

index 46b146474cacaa4d5c5787cd7c7293c03f91c700..1e0e45510d351c2f32ea3755234807bf33719df6 100644 (file)
@@ -94,7 +94,7 @@ static char * __cvt(double value, int ndigit, int *decpt, int *sign, int fmode,
                        *decpt = 0;
                        c = *p;
                        zend_freedtoa(p);
-                       return(c == 'I' ? "INF" : "NAN");
+                       return strdup((c == 'I' ? "INF" : "NAN"));
                }
                /* Make a local copy and adjust rve to be in terms of s */
                if (pad && fmode) {