From 97c530fece03bb42b43137b8542d33a4a09f31c7 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 30 May 2016 12:47:04 +0200 Subject: [PATCH] Add test for bug #72258 --- ext/zip/tests/bug72258.phpt | 26 ++++++++++++++++++++++++++ ext/zip/tests/bug72258.zip | Bin 0 -> 110 bytes 2 files changed, 26 insertions(+) create mode 100644 ext/zip/tests/bug72258.phpt create mode 100644 ext/zip/tests/bug72258.zip diff --git a/ext/zip/tests/bug72258.phpt b/ext/zip/tests/bug72258.phpt new file mode 100644 index 0000000000..0e0c8c1a71 --- /dev/null +++ b/ext/zip/tests/bug72258.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #72258 ZipArchive converts fns to unrecoverable form +--SKIPIF-- + +--FILE-- +open($fn); +if ($res !== true) { + echo 'Error opening: ' . $res; + die(); +} + +for ($i = 0; $i < $zip->numFiles; $i++) { + $fnInArc = $zip->getNameIndex($i, ZipArchive::FL_ENC_RAW); + var_dump($fnInArc); +} +?> +--EXPECT-- +string(6) "€‚ƒ„/" diff --git a/ext/zip/tests/bug72258.zip b/ext/zip/tests/bug72258.zip new file mode 100644 index 0000000000000000000000000000000000000000..07ea2e49486b6815802855042a1fd1e4aee2c35f GIT binary patch literal 110 zcmWIWW@Zs#0D-d`_IiLBP=XCeH#9aix9A6WGct)V<5mUJ_1_W1g6Uxe8Nk2@geE{* I1;k+h0B>#%LI3~& literal 0 HcmV?d00001 -- 2.50.1