From 7355ab81763a3d6a04ac11660e6a16d58838d187 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 14 Jul 2020 17:04:24 +0200 Subject: Fix #79797: Use of freed hash key in the phar_parse_zipfile function We must not use heap memory after we freed it. --- ext/phar/tests/bug79797.phar | Bin 0 -> 274 bytes ext/phar/tests/bug79797.phpt | 14 ++++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ext/phar/tests/bug79797.phar create mode 100644 ext/phar/tests/bug79797.phpt (limited to 'ext/phar/tests') diff --git a/ext/phar/tests/bug79797.phar b/ext/phar/tests/bug79797.phar new file mode 100644 index 0000000000..21d43d9eeb Binary files /dev/null and b/ext/phar/tests/bug79797.phar differ diff --git a/ext/phar/tests/bug79797.phpt b/ext/phar/tests/bug79797.phpt new file mode 100644 index 0000000000..761e5379e0 --- /dev/null +++ b/ext/phar/tests/bug79797.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #79797 (Use of freed hash key in the phar_parse_zipfile function) +--SKIPIF-- + +--INI-- +phar.cache_list={PWD}/bug79797.phar +--FILE-- + +--EXPECT-- +done -- cgit v1.2.1