mirror of
https://github.com/nmap/nmap.git
synced 2026-06-29 04:33:23 +00:00
Fix undefined behavior iterator deref. Fixes #3378
This commit is contained in:
parent
a36249fdda
commit
141bb72624
1 changed files with 2 additions and 2 deletions
|
|
@ -766,8 +766,8 @@ bool FingerTest::str2AVal(const char *str, const char *end) {
|
|||
return false;
|
||||
}
|
||||
std::map<FPstr, u8>::const_iterator idx = def->AttrIdx.find(FPstr(p, q));
|
||||
u8 j = idx->second;
|
||||
if (idx == def->AttrIdx.end() || AVs[j] != NULL) {
|
||||
u8 j = 0;
|
||||
if (idx == def->AttrIdx.end() || AVs[(j = idx->second)] != NULL) {
|
||||
error("Parse error with AVal string (%s) in nmap-os-db file", str);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue