mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 11:55:27 +00:00
Also check lower bound for attr cast to int
This commit is contained in:
parent
c40965039b
commit
117329a5e4
1 changed files with 1 additions and 1 deletions
2
osscan.h
2
osscan.h
|
|
@ -245,7 +245,7 @@ struct ObservationPrint {
|
|||
FingerPrintScan scan_info;
|
||||
std::vector<FingerTest> extra_tests;
|
||||
const char *getInfo(FingerPrintScan::Attribute attr) const {
|
||||
if (attr >= FingerPrintScan::MAX_ATTR)
|
||||
if (attr >= FingerPrintScan::MAX_ATTR || attr < 0)
|
||||
return NULL;
|
||||
return scan_info.values[static_cast<int>(attr)];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue