php-src/ext/com_dotnet
Christoph M. Becker a385cfa7ad Fix #63208: BSTR to PHP string conversion not binary safe
A `BSTR` is similar to a `zend_string`; it stores the length of the
string just before the actual string, and thus the string may contain
NUL bytes.  However, `php_com_olestring_to_string()` is supposed to
deal with arbitrary `OLECHAR*`s which may not be `BSTR`s, so we
introduce `php_com_bstr_to_string()` and use it for the only case where
we actually have to deal with `BSTR`s which may contain NUL bytes.

Contrary to `php_com_olestring_to_string()` we return a `zend_string`,
so we can save the re-allocation when converting to a `zval`.

We also cater to `php_com_string_to_olestring()` not being binary safe,
with basically the same fix we did for `php_com_olestring_to_string()`.
2020-06-29 19:05:02 +02:00
..
tests Fix #63208: BSTR to PHP string conversion not binary safe 2020-06-29 19:05:02 +02:00
com_com.c Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
com_dotnet.c Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
com_extension.c Fix #79242: COM error constants don't match com_exception codes 2020-02-07 18:04:14 +01:00
com_handlers.c Merge branch 'PHP-7.2' into PHP-7.3 2019-10-19 11:49:18 +02:00
com_iterator.c Fix #79248: Traversing empty VT_ARRAY throws com_exception 2020-02-08 17:05:29 +01:00
com_misc.c Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
com_olechar.c Fix #63208: BSTR to PHP string conversion not binary safe 2020-06-29 19:05:02 +02:00
com_persist.c Fix #79332: php_istreams are never freed 2020-03-02 10:45:37 +01:00
com_saproxy.c Sync leading and final newlines in source code files 2018-10-14 12:55:24 +02:00
com_typeinfo.c Fix #79333: com_print_typeinfo() leaks memory 2020-03-02 11:36:30 +01:00
com_variant.c Fix #63208: BSTR to PHP string conversion not binary safe 2020-06-29 19:05:02 +02:00
com_wrapper.c Sync leading and final newlines in source code files 2018-10-14 12:55:24 +02:00
config.w32 Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
CREDITS
php_com_dotnet.h Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
php_com_dotnet_internal.h Fix #63208: BSTR to PHP string conversion not binary safe 2020-06-29 19:05:02 +02:00