diff options
Diffstat (limited to 'ext/standard/quot_print.c')
| -rw-r--r-- | ext/standard/quot_print.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index 280b86a9a2..6627858989 100644 --- a/ext/standard/quot_print.c +++ b/ext/standard/quot_print.c @@ -151,7 +151,7 @@ PHPAPI unsigned char *php_quot_print_encode(const unsigned char *str, size_t len unsigned char c, *ret, *d; char *hex = "0123456789ABCDEF"; - ret = safe_emalloc(1, 3 * length + 3 * (((3 * length)/PHP_QPRINT_MAXL) + 1), 0); + ret = safe_emalloc(3, length + (((3 * length)/(PHP_QPRINT_MAXL-9)) + 1), 1); d = ret; while (length--) { |
