diff --git a/osscan.cc b/osscan.cc index d4f58f978..5957ea3b3 100644 --- a/osscan.cc +++ b/osscan.cc @@ -766,8 +766,8 @@ bool FingerTest::str2AVal(const char *str, const char *end) { return false; } std::map::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; }