Skip to content

Commit 8200d66

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: Don't try to access memory outside string
2 parents 072b09f + 187a0e4 commit 8200d66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/filter/logical_filters.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ static int _php_filter_validate_domain(char * domain, size_t len, zend_long flag
517517
t = e - 1;
518518

519519
/* Ignore trailing dot */
520-
if (*t == '.') {
520+
if (l > 0 && *t == '.') {
521521
e = t;
522522
l--;
523523
}

0 commit comments

Comments
 (0)