Skip to content

Commit 1274c7b

Browse files
Exit MatchDomainName if pattern or string length reach 0.
1 parent 84f9b20 commit 1274c7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13285,7 +13285,7 @@ int MatchDomainName(const char* pattern, int patternLen, const char* str,
1328513285
return 1;
1328613286
#endif
1328713287

13288-
while (patternLen > 0) {
13288+
while (patternLen > 0 && strLen > 0) {
1328913289
/* Get the next pattern char to evaluate */
1329013290
char p = (char)XTOLOWER((unsigned char)*pattern);
1329113291
if (p == '\0')

0 commit comments

Comments
 (0)