From: George Peter Banyard Date: Wed, 17 Mar 2021 11:23:02 +0000 (+0000) Subject: Use zend_string_equals() API instead of strcmp() in SOAP extension X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84e12626e7f6efb94f028b71762442e80a5c0363;p=php Use zend_string_equals() API instead of strcmp() in SOAP extension --- diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index b14c8cc1a1..9119fee9a7 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -491,7 +491,7 @@ try_again: (((use_ssl && orig->scheme != NULL && zend_string_equals_literal(orig->scheme, "https")) || (!use_ssl && orig->scheme == NULL) || (!use_ssl && !zend_string_equals_literal(orig->scheme, "https"))) && - strcmp(ZSTR_VAL(orig->host), ZSTR_VAL(phpurl->host)) == 0 && + zend_string_equals(orig->host, phpurl->host) && orig->port == phpurl->port))) { } else { php_stream_close(stream); diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 49815082a8..b1423bc60a 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1275,9 +1275,9 @@ PHP_METHOD(SoapServer, handle) (encoding = zend_hash_str_find(Z_ARRVAL_P(server_vars), "HTTP_CONTENT_ENCODING", sizeof("HTTP_CONTENT_ENCODING")-1)) != NULL && Z_TYPE_P(encoding) == IS_STRING) { - if (strcmp(Z_STRVAL_P(encoding),"gzip") == 0 - || strcmp(Z_STRVAL_P(encoding),"x-gzip") == 0 - || strcmp(Z_STRVAL_P(encoding),"deflate") == 0 + if (zend_string_equals_literal(Z_STR_P(encoding), "gzip") + || zend_string_equals_literal(Z_STR_P(encoding), "x-gzip") + || zend_string_equals_literal(Z_STR_P(encoding), "deflate") ) { zval filter_params;