diff options
author | Dmitry Stogov <dmitry@php.net> | 2011-07-11 09:47:59 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2011-07-11 09:47:59 +0000 |
commit | 7d1eef4aa7cf05ae0141146a8fc72d12e566a975 (patch) | |
tree | 8997ce8166b1af541ad9406cfaefc4474c2f7b23 /main/snprintf.c | |
parent | 5d5951f2473f5b0b596540631920fda2ac657160 (diff) | |
download | php-git-7d1eef4aa7cf05ae0141146a8fc72d12e566a975.tar.gz |
Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption)
Diffstat (limited to 'main/snprintf.c')
-rw-r--r-- | main/snprintf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/snprintf.c b/main/snprintf.c index 30456dd437..76882fc3ca 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -497,8 +497,11 @@ char * ap_php_conv_p2(register u_wide_int num, register int nbits, char format, * NUM_BUF_SIZE is the size of the buffer used for arithmetic conversions * * XXX: this is a magic number; do not decrease it + * Emax = 1023 + * NDIG = 320 + * NUM_BUF_SIZE >= strlen("-") + Emax + strlrn(".") + NDIG + strlen("E+1023") + 1; */ -#define NUM_BUF_SIZE 512 +#define NUM_BUF_SIZE 2048 /* |