]> granicus.if.org Git - php/commitdiff
fix segfault with 'B' format param
authorAntony Dovgal <tony2001@php.net>
Tue, 27 Jun 2006 15:06:18 +0000 (15:06 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 27 Jun 2006 15:06:18 +0000 (15:06 +0000)
ext/date/php_date.c

index 4bbbbdfa173a66ef5b0938a10bcddcc850e74647..448edd0b8d35196a7f7024ec691218912c2708a5 100644 (file)
@@ -873,7 +873,7 @@ static char *date_format(char *format, int format_len, int *return_len, timelib_
                                        retval += 1000;
                                }
                                retval = retval % 1000;
-                               date_spprintf(&buffer, 32 TSRMLS_CC, "%03d", retval);
+                               length = date_spprintf(&buffer, 32 TSRMLS_CC, "%03d", retval);
                                break;
                        }
                        case 'g': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%d", (t->h % 12) ? (int) t->h % 12 : 12); break;