summaryrefslogtreecommitdiff
path: root/ext/iconv/tests
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2019-05-27 16:49:19 -0700
committerStanislav Malyshev <stas@php.net>2019-05-27 16:49:19 -0700
commite77c8e45bab082f32d0a6351b0b4fb8a0c0f3ba2 (patch)
treee44c0e0188bb0afe74ab718e4186399317ef0a78 /ext/iconv/tests
parenta0c9d0849aa5e53c37f8fd68db80412364e8edaf (diff)
parent16e037bd46359a31f218ee220ff09f1c3270e489 (diff)
downloadphp-git-e77c8e45bab082f32d0a6351b0b4fb8a0c0f3ba2.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Update NEWS Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow Fix #77973: Uninitialized read in gdImageCreateFromXbm
Diffstat (limited to 'ext/iconv/tests')
-rw-r--r--ext/iconv/tests/bug78069.databin0 -> 107 bytes
-rw-r--r--ext/iconv/tests/bug78069.phpt15
2 files changed, 15 insertions, 0 deletions
diff --git a/ext/iconv/tests/bug78069.data b/ext/iconv/tests/bug78069.data
new file mode 100644
index 0000000000..ebd5d0bdcf
--- /dev/null
+++ b/ext/iconv/tests/bug78069.data
Binary files differ
diff --git a/ext/iconv/tests/bug78069.phpt b/ext/iconv/tests/bug78069.phpt
new file mode 100644
index 0000000000..1341a5ef4f
--- /dev/null
+++ b/ext/iconv/tests/bug78069.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #78069 (Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow)
+--SKIPIF--
+<?php
+if (!extension_loaded('iconv')) die('skip ext/iconv required');
+?>
+--FILE--
+<?php
+$hdr = iconv_mime_decode_headers(file_get_contents(__DIR__ . "/bug78069.data"),2);
+var_dump(count($hdr));
+?>
+DONE
+--EXPECT--
+int(1)
+DONE \ No newline at end of file