diff options
Diffstat (limited to 'ext/standard/quot_print.c')
-rw-r--r-- | ext/standard/quot_print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index 28dcc63f13..0df127362f 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--) { @@ -286,4 +286,4 @@ PHP_FUNCTION(quoted_printable_encode) * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 - */
\ No newline at end of file + */ |