|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchessoap.c.patch (last revision 2011-03-19 06:30 UTC by tom at samplonius dot org)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-03-19 18:36 UTC] felipe@php.net
[2011-03-19 18:38 UTC] felipe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: felipe
[2011-03-19 18:38 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 10:00:01 2025 UTC |
Description: ------------ This code in soap.c: if (zend_hash_find(ht, "soap_version", sizeof("soap_version"), (void**)&tmp) == SUCCESS) { if (Z_TYPE_PP(tmp) == IS_LONG || (Z_LVAL_PP(tmp) == SOAP_1_1 && Z_LVAL_PP(tmp) == SOAP_1_2)) { version = Z_LVAL_PP(tmp); } } has a problem with the second line of the inner if statement. Z_LVAL_PP(tmp) can't be both equal to SOAP_1_1 and SOAP_1_2, so this part will always be false. Plus, the "||" logic seems wrong too. It appears that if the type is IS_LONG, then any value is accepted. Patch is attached. It looks like the logic is inverted. || should && and && should be ||: if (zend_hash_find(ht, "soap_version", sizeof("soap_version"), (void**)&tmp) == SUCCESS) { if (Z_TYPE_PP(tmp) == IS_LONG && (Z_LVAL_PP(tmp) == SOAP_1_1 || Z_LVAL_PP(tmp) == SOAP_1_2)) { version = Z_LVAL_PP(tmp); } }