summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/tests
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-06-29 19:06:56 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-06-29 19:06:56 +0200
commitbf6720d582de512fb6a8dd42c8515bc14e0953c5 (patch)
tree62ef1c490dbe33203d4350cc9978c7abfe50f5c1 /ext/com_dotnet/tests
parent43b5d5834197bef731a06f8ea025550df08c3fd1 (diff)
parent4af69b84779c1e13e0d98a8eac18a81c0d61f283 (diff)
downloadphp-git-bf6720d582de512fb6a8dd42c8515bc14e0953c5.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #63208: BSTR to PHP string conversion not binary safe
Diffstat (limited to 'ext/com_dotnet/tests')
-rw-r--r--ext/com_dotnet/tests/bug63208.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/com_dotnet/tests/bug63208.phpt b/ext/com_dotnet/tests/bug63208.phpt
new file mode 100644
index 0000000000..ae62dbba98
--- /dev/null
+++ b/ext/com_dotnet/tests/bug63208.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #63208 (BSTR to PHP string conversion not binary safe)
+--SKIPIF--
+<?php
+if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
+?>
+--FILE--
+<?php
+$string = "\u{0905}b\0cd";
+$variant = new VARIANT($string, VT_ARRAY | VT_UI1, CP_UTF8); // Array of bytes
+$converted = (string) $variant;
+var_dump(bin2hex($string));
+var_dump(bin2hex($converted));
+?>
+--EXPECT--
+string(14) "e0a48562006364"
+string(14) "e0a48562006364"