summaryrefslogtreecommitdiff
path: root/main/snprintf.c
diff options
context:
space:
mode:
authorFelipe Pena <felipensp@gmail.com>2012-07-14 15:15:11 -0300
committerFelipe Pena <felipensp@gmail.com>2012-07-14 15:15:11 -0300
commit63f3962a9015cd119b028e4c6e3f5533fb9f38e0 (patch)
tree1488b6553e24232653d513cb7293f6d99613c430 /main/snprintf.c
parent864575251ac85176b763a56b35c2da298e0d0fa7 (diff)
downloadphp-git-63f3962a9015cd119b028e4c6e3f5533fb9f38e0.tar.gz
- Fixed bug #62525 (sigabrt while converting floating point to string)
Diffstat (limited to 'main/snprintf.c')
-rw-r--r--main/snprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/snprintf.c b/main/snprintf.c
index 46b146474c..1e0e45510d 100644
--- a/main/snprintf.c
+++ b/main/snprintf.c
@@ -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) {