1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 08:59:01 +00:00

Fix a typo in parse_fingerprint_file; after calling strpbrk we need to

test teh return value, not the (unchanged) value we passed in. This
would cause a segmentation fault instead of a fatal error if nmap-os-db
ended in a Fingerprint line that didn't have a terminating newline.
This commit is contained in:
david
2009-08-24 21:25:06 +00:00
parent cac58924e0
commit 6dc99d0e25

View File

@@ -1069,7 +1069,7 @@ while(fgets(line, sizeof(line), fp)) {
while(*p && isspace((int) (unsigned char) *p)) p++;
q = strpbrk(p, "\n#");
if (!p) fatal("Parse error on line %d of fingerprint: %s", lineno, line);
if (!q) fatal("Parse error on line %d of fingerprint: %s", lineno, line);
while(isspace((int) (unsigned char) *(--q)))
;