From: Michael Wallner Date: Mon, 3 Oct 2016 13:34:22 +0000 (+0200) Subject: fix idna parser flags checking X-Git-Tag: RELEASE_3_1_0_RC1~6 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=96202e444961b5df27adacae7b155312d038dd87;p=m6w6%2Fext-http fix idna parser flags checking --- diff --git a/src/php_http_url.c b/src/php_http_url.c index 7e325dc..cead8c8 100644 --- a/src/php_http_url.c +++ b/src/php_http_url.c @@ -1189,9 +1189,9 @@ static ZEND_RESULT_CODE parse_widn_2003(struct parse_state *state) static ZEND_RESULT_CODE parse_idna(struct parse_state *state, size_t len) { #if PHP_HTTP_HAVE_IDNA2008 - if ((state->flags & PHP_HTTP_URL_PARSE_TOIDN_2008) + if ((state->flags & PHP_HTTP_URL_PARSE_TOIDN_2008) == PHP_HTTP_URL_PARSE_TOIDN_2008 # if PHP_HTTP_HAVE_IDNA2003 - || !(state->flags & PHP_HTTP_URL_PARSE_TOIDN_2003) + || (state->flags & PHP_HTTP_URL_PARSE_TOIDN_2003) != PHP_HTTP_URL_PARSE_TOIDN_2003 # endif ) { #if HAVE_UIDNA_NAMETOASCII_UTF8 @@ -1205,9 +1205,9 @@ static ZEND_RESULT_CODE parse_idna(struct parse_state *state, size_t len) #endif #if PHP_HTTP_HAVE_IDNA2003 - if ((state->flags & PHP_HTTP_URL_PARSE_TOIDN_2003) + if ((state->flags & PHP_HTTP_URL_PARSE_TOIDN_2003) == PHP_HTTP_URL_PARSE_TOIDN_2003 # if PHP_HTTP_HAVE_IDNA2008 - || !(state->flags & PHP_HTTP_URL_PARSE_TOIDN_2008) + || (state->flags & PHP_HTTP_URL_PARSE_TOIDN_2008) != PHP_HTTP_URL_PARSE_TOIDN_2008 #endif ) { #if HAVE_UIDNA_IDNTOASCII