Skip to content

Commit

Permalink
Don't try to access memory outside string
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Mar 28, 2022
1 parent 5a8622f commit 2119ba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/filter/logical_filters.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ static int _php_filter_validate_domain(char * domain, size_t len, zend_long flag
t = e - 1;

/* Ignore trailing dot */
if (*t == '.') {
if (l > 0 && *t == '.') {
e = t;
l--;
}
Expand Down

0 comments on commit 2119ba2

Please sign in to comment.