Patch snprintf.patch for Reproducible crash Bug #62525
Patch version 2012-07-10 17:06 UTC
Return to Bug #62525 |
Download this patch
Patch Revisions:
Developer: perryjp@gmail.com
diff --git a/main/snprintf.c b/main/snprintf.c
index cd038d0..113e220 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(c == 'I' ? strdup("INF") : strdup("NAN"));
}
/* Make a local copy and adjust rve to be in terms of s */
if (pad && fmode) {
|