summaryrefslogtreecommitdiff
path: root/ext/gd/tests
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-09-24 12:46:20 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2016-09-24 12:47:07 +0200
commitc733f92d729a9388e5290de1d45fcd9afa523330 (patch)
tree34edfe224b304c885844f5713784da1c9a9bad1b /ext/gd/tests
parent394e9b3d15758dbf24dbe53f30d68962534ea501 (diff)
parent5c81298597f291f7785d9f0ff2c331b4c53ced6c (diff)
downloadphp-git-c733f92d729a9388e5290de1d45fcd9afa523330.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'ext/gd/tests')
-rw-r--r--ext/gd/tests/bug73161.gd2bin0 -> 26 bytes
-rw-r--r--ext/gd/tests/bug73161.phpt18
2 files changed, 18 insertions, 0 deletions
diff --git a/ext/gd/tests/bug73161.gd2 b/ext/gd/tests/bug73161.gd2
new file mode 100644
index 0000000000..f5084e4976
--- /dev/null
+++ b/ext/gd/tests/bug73161.gd2
Binary files differ
diff --git a/ext/gd/tests/bug73161.phpt b/ext/gd/tests/bug73161.phpt
new file mode 100644
index 0000000000..42ad718606
--- /dev/null
+++ b/ext/gd/tests/bug73161.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #73161 (imagecreatefromgd2() may leak memory)
+--DESCRIPTION--
+We're testing for a memory leak that might not even show up with valgrind.
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+$im = imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73161.gd2');
+var_dump($im);
+?>
+===DONE===
+--EXPECTF--
+Warning: imagecreatefromgd2(): '%s' is not a valid GD2 file in %s on line %d
+bool(false)
+===DONE===