Skip to content

Commit 2119ba2

Browse files
committed
Don't try to access memory outside string
1 parent 5a8622f commit 2119ba2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: ext/filter/logical_filters.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static int _php_filter_validate_domain(char * domain, size_t len, zend_long flag
509509
t = e - 1;
510510

511511
/* Ignore trailing dot */
512-
if (*t == '.') {
512+
if (l > 0 && *t == '.') {
513513
e = t;
514514
l--;
515515
}

0 commit comments

Comments
 (0)