summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/bug60965.phpt
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2012-02-04 18:12:18 +0000
committerGustavo André dos Santos Lopes <cataphract@php.net>2012-02-04 18:12:18 +0000
commit122e11ef6e5af5eb5e940b08bb018fd0d03a34d2 (patch)
tree8a760f276273193d2ad42aef5ce090e621cadf6f /ext/standard/tests/strings/bug60965.phpt
parentd2ca448f0743b78007b4b40b04051a62b860236e (diff)
downloadphp-git-122e11ef6e5af5eb5e940b08bb018fd0d03a34d2.tar.gz
- Fixed bug #60965 (Buffer overflow on htmlspecialchars/entities with
$double=false). - Removed unused variable. - Given maxlen the usual meaning of *len variables (terminator not included). - Changed some comments.
Diffstat (limited to 'ext/standard/tests/strings/bug60965.phpt')
-rw-r--r--ext/standard/tests/strings/bug60965.phpt10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/standard/tests/strings/bug60965.phpt b/ext/standard/tests/strings/bug60965.phpt
new file mode 100644
index 0000000000..57a3b1c947
--- /dev/null
+++ b/ext/standard/tests/strings/bug60965.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #60965: Buffer overflow on htmlspecialchars/entities with $double=false
+--FILE--
+<?php
+echo htmlspecialchars('"""""""""""""""""""""""""""""""""""""""""""""&#x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005;',
+ENT_QUOTES, 'UTF-8', false), "\n";
+echo "Done.\n";
+--EXPECT--
+&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&#x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005;
+Done.