summaryrefslogtreecommitdiff
path: root/ext/gd/tests/bug73957.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/tests/bug73957.phpt')
-rw-r--r--ext/gd/tests/bug73957.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/gd/tests/bug73957.phpt b/ext/gd/tests/bug73957.phpt
new file mode 100644
index 0000000000..370956f032
--- /dev/null
+++ b/ext/gd/tests/bug73957.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #73957 (signed integer conversion in imagescale())
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only');
+?>
+--FILE--
+<?php
+$im = imagecreate(8, 8);
+$im = imagescale($im, 0x100000001, 1);
+var_dump($im);
+if ($im) { // which is not supposed to happen
+ var_dump(imagesx($im));
+}
+?>
+===DONE===
+--EXPECT--
+bool(false)
+===DONE===