Don't try to access memory outside string

This commit is contained in:
Stanislav Malyshev 2022-03-28 10:52:34 -06:00
parent 5a8622fe78
commit 2119ba215a
No known key found for this signature in database
GPG key ID: 94B3CB48C3ECA219

View file

@ -509,7 +509,7 @@ static int _php_filter_validate_domain(char * domain, size_t len, zend_long flag
t = e - 1; t = e - 1;
/* Ignore trailing dot */ /* Ignore trailing dot */
if (*t == '.') { if (l > 0 && *t == '.') {
e = t; e = t;
l--; l--;
} }