Skip to content

Commit 63f3962

Browse files
committed
- Fixed bug #62525 (sigabrt while converting floating point to string)
1 parent 8645752 commit 63f3962

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/snprintf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static char * __cvt(double value, int ndigit, int *decpt, int *sign, int fmode,
9494
*decpt = 0;
9595
c = *p;
9696
zend_freedtoa(p);
97-
return(c == 'I' ? "INF" : "NAN");
97+
return strdup((c == 'I' ? "INF" : "NAN"));
9898
}
9999
/* Make a local copy and adjust rve to be in terms of s */
100100
if (pad && fmode) {

0 commit comments

Comments
 (0)