Bug #69288 [NEW]: Regression introduced in fix for bug 69085 leads to segmentation fault
From: thomas at shadowweb dot org
Operating system:
PHP version: 5.4.39
Package: Reproducible crash
Bug Type: Bug
Bug description:Regression introduced in fix for bug 69085 leads to segmentation fault
Description:
------------
A bug/regression introduced in commit
c8eaca013a3922e8383def6158ece2b63f6ec483 (for PHP 5.4) and
b3ac3522534a75edb76312cf9a576e4624372123 (Merge to PHP 5.5) leads to
reproductible segmentation faults, when using SOAP with PHP versions
5.4.39 and 5.5.23.
I will not include a testscript, since the bug is obvious from the
commit:
- if (zend_hash_find(ht, "enc_namens",
sizeof("enc_namens"), (void **)&znamens) == SUCCESS) {
+ if (zend_hash_find(ht, "enc_namens",
sizeof("enc_namens"), (void **)&znamens) == SUCCESS &&
+ Z_TYPE_PP(zname) == IS_STRING) {
xmlNsPtr nsp = encode_add_ns(node,
Z_STRVAL_PP(znamens));
xmlSetNs(node, nsp);
}
"Z_TYPE_PP(zname) == IS_STRING" should be "Z_TYPE_PP(znamens)", the
included patch is for PHP 5.4.39.
--
Edit bug report at https://bugs.php.net/bug.php?id=69288&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69288&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69288&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69288&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69288&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69288&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69288&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69288&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69288&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69288&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69288&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69288&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69288&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69288&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69288&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69288&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69288&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69288&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69288&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69288&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69288&r=mysqlcfg
Thread (4 messages)
- thomas at shadowweb dot org