Description: fix null pointer dereference in phar_get_fp_offset() Origin: upstream, http://git.php.net/?p=php-src.git;a=commit;h=d698f0ae51f67c9cce870b09c59df3d6ba959244 Origin: upstream, http://git.php.net/?p=php-src.git;a=commit;h=f98ab19dc0c978e3caaa2614579e4a61f2c317f5 Bug: https://bugs.php.net/bug.php?id=69720 Index: php5-5.6.11+dfsg/ext/phar/util.c =================================================================== --- php5-5.6.11+dfsg.orig/ext/phar/util.c 2015-07-09 20:33:32.000000000 -0400 +++ php5-5.6.11+dfsg/ext/phar/util.c 2015-10-27 16:45:38.051419680 -0400 @@ -494,7 +494,12 @@ (*ret)->is_tar = entry->is_tar; (*ret)->fp = phar_get_efp(entry, 1 TSRMLS_CC); if (entry->link) { - (*ret)->zero = phar_get_fp_offset(phar_get_link_source(entry TSRMLS_CC) TSRMLS_CC); + phar_entry_info *link = phar_get_link_source(entry TSRMLS_CC); + if(!link) { + efree(*ret); + return FAILURE; + } + (*ret)->zero = phar_get_fp_offset(link TSRMLS_CC); } else { (*ret)->zero = phar_get_fp_offset(entry TSRMLS_CC); }