1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix expr_match bug

This commit is contained in:
dmiller
2023-12-05 21:47:33 +00:00
parent f3f9ca7a8b
commit e47b742669
2 changed files with 2 additions and 1 deletions

View File

@@ -371,7 +371,7 @@ bool expr_match(const char *val, size_t vlen, const char *expr, size_t explen, b
}
goto next_expr;
} else {
q1 = strchr_p(p, p_end, '-');
q1 = strchr_p(p, q ? q : p_end, '-');
if (q1 != NULL) {
size_t sublen1 = q1 - p;
if ((vlen > sublen1)