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:
@@ -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)))
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user