summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/bug74950.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/simplexml/tests/bug74950.phpt')
-rw-r--r--ext/simplexml/tests/bug74950.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/simplexml/tests/bug74950.phpt b/ext/simplexml/tests/bug74950.phpt
new file mode 100644
index 0000000000..f267a07a81
--- /dev/null
+++ b/ext/simplexml/tests/bug74950.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #74950 (null pointer deref in zim_simplexml_element_getDocNamespaces)
+--SKIPIF--
+<?php
+if (!extension_loaded("simplexml")) die("skip SimpleXML not available");
+?>
+--FILE--
+<?php
+$xml=new SimpleXMLElement(0,9000000000);var_dump($xml->getDocNamespaces())?>
+?>
+--EXPECTF--
+Fatal error: Uncaught Exception: Invalid options in %sbug74950.php:%d
+Stack trace:
+#0 %sbug74950.php(%d): SimpleXMLElement->__construct('0', 9000000000)
+#1 {main}
+ thrown in %sbug74950.php on line %d