1
0
mirror of https://github.com/php/php-src.git synced 2026-04-16 12:31:06 +02:00

Fixed recently introduced memory leak

This commit is contained in:
Dmitry Stogov
2015-04-14 15:47:26 +03:00
parent 4b27569dc3
commit dfffa0ba5b

View File

@@ -1111,6 +1111,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char
entry.metadata_len = 0;
}
if (len > endbuffer - buffer) {
pefree(entry.filename, entry.is_persistent);
MAPPHAR_FAIL("internal corruption of phar \"%s\" (truncated manifest entry)");
}
if (phar_parse_metadata(&buffer, &entry.metadata, len TSRMLS_CC) == FAILURE) {