diff options
author | Stanislav Malyshev <stas@php.net> | 2018-12-03 00:42:50 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2018-12-03 00:42:50 -0800 |
commit | 8fff90250bebaef0ffbf37008358f4db5a68dd50 (patch) | |
tree | 50976da5069c46ffbfee95780fb48978ee8a1e4b /ext/phar/tests | |
parent | 1f78b1dfd0711c3f3659965abd19862bb4706b19 (diff) | |
parent | 8ab5d22332b4fbb9b683bac36ce0b5ebc5501794 (diff) | |
download | php-git-8fff90250bebaef0ffbf37008358f4db5a68dd50.tar.gz |
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
Fix bug #77143 - add more checks to buffer reads
Fix bug #77143 - add more checks to buffer reads
Fix #77020: null pointer dereference in imap_mail
Diffstat (limited to 'ext/phar/tests')
-rw-r--r-- | ext/phar/tests/bug73768.phpt | 2 | ||||
-rw-r--r-- | ext/phar/tests/bug77143.phar | bin | 0 -> 50 bytes | |||
-rw-r--r-- | ext/phar/tests/bug77143.phpt | 18 |
3 files changed, 19 insertions, 1 deletions
diff --git a/ext/phar/tests/bug73768.phpt b/ext/phar/tests/bug73768.phpt index 37a4da0253..3062268b80 100644 --- a/ext/phar/tests/bug73768.phpt +++ b/ext/phar/tests/bug73768.phpt @@ -13,4 +13,4 @@ echo "OK\n"; } ?> --EXPECTF-- -cannot load phar "%sbug73768.phar" with implicit alias "" under different alias "alias.phar" +internal corruption of phar "%sbug73768.phar" (truncated manifest header) diff --git a/ext/phar/tests/bug77143.phar b/ext/phar/tests/bug77143.phar Binary files differnew file mode 100644 index 0000000000..eb797b5195 --- /dev/null +++ b/ext/phar/tests/bug77143.phar diff --git a/ext/phar/tests/bug77143.phpt b/ext/phar/tests/bug77143.phpt new file mode 100644 index 0000000000..f9f80fc4f4 --- /dev/null +++ b/ext/phar/tests/bug77143.phpt @@ -0,0 +1,18 @@ +--TEST-- +PHP bug #77143: Heap Buffer Overflow (READ: 4) in phar_parse_pharfile +--INI-- +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE-- +<?php +chdir(__DIR__); +try { +var_dump(new Phar('bug77143.phar',0,'project.phar')); +echo "OK\n"; +} catch(UnexpectedValueException $e) { + echo $e->getMessage(); +} +?> +--EXPECTF-- +internal corruption of phar "%sbug77143.phar" (truncated manifest header) |