From: Felipe Pena Date: Sun, 11 May 2014 12:45:17 +0000 (-0300) Subject: - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org) X-Git-Tag: php-5.4.29RC1~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb3b8de98deb03f4d9d6ee8745df4fa221bbd78e;p=php - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org) --- diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index ebaa620080..8e27685759 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1513,7 +1513,7 @@ static int phar_build(zend_object_iterator *iter, void *puser TSRMLS_DC) /* {{{ } close_fp = 0; - opened = (char *) estrndup(str, sizeof("[stream]") + 1); + opened = (char *) estrndup(str, sizeof("[stream]") - 1); goto after_open_fp; case IS_OBJECT: if (instanceof_function(Z_OBJCE_PP(value), spl_ce_SplFileInfo TSRMLS_CC)) {