1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove dead check in pcre

This isn't reachable since ab32d36, because since then the library
itself checks this condition during compilation. The compilation failure
that results of it makes this code not reachable.

This is split off of GH-14424.
This commit is contained in:
Niels Dossche
2024-06-03 19:57:12 +02:00
parent 6a14730d20
commit 315f2059b7

View File

@@ -550,11 +550,6 @@ static zend_string **make_subpats_table(uint32_t num_subpats, pcre_cache_entry *
unsigned short name_idx = 0x100 * (unsigned char)name_table[0] + (unsigned char)name_table[1];
const char *name = name_table + 2;
subpat_names[name_idx] = zend_string_init(name, strlen(name), 0);
if (is_numeric_string(ZSTR_VAL(subpat_names[name_idx]), ZSTR_LEN(subpat_names[name_idx]), NULL, NULL, 0) > 0) {
php_error_docref(NULL, E_WARNING, "Numeric named subpatterns are not allowed");
free_subpats_table(subpat_names, num_subpats);
return NULL;
}
name_table += name_size;
}
return subpat_names;