From af84ebb041f9d32028f07b1b83698e85b030944e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 13 Dec 2019 17:59:52 +0100 Subject: [PATCH] Remove dead code in sanitizing_filter.c of the filter extension --- ext/filter/sanitizing_filters.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c index a39213d52f..cb1d3a10b2 100644 --- a/ext/filter/sanitizing_filters.c +++ b/ext/filter/sanitizing_filters.c @@ -72,17 +72,7 @@ static void php_filter_encode_url(zval *value, const unsigned char* chars, const while (s < e) { tmp[*s++] = '\0'; } -/* XXX: This is not needed since these chars in the allowed list never include the high/low/null value - if (encode_nul) { - tmp[0] = 1; - } - if (high) { - memset(tmp + 127, 1, sizeof(tmp) - 127); - } - if (low) { - memset(tmp, 1, 32); - } -*/ + str = zend_string_safe_alloc(Z_STRLEN_P(value), 3, 0, 0); p = (unsigned char *) ZSTR_VAL(str); s = (unsigned char *) Z_STRVAL_P(value); -- 2.50.1