mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Also check lower bound for attr cast to int
This commit is contained in:
2
osscan.h
2
osscan.h
@@ -245,7 +245,7 @@ struct ObservationPrint {
|
|||||||
FingerPrintScan scan_info;
|
FingerPrintScan scan_info;
|
||||||
std::vector<FingerTest> extra_tests;
|
std::vector<FingerTest> extra_tests;
|
||||||
const char *getInfo(FingerPrintScan::Attribute attr) const {
|
const char *getInfo(FingerPrintScan::Attribute attr) const {
|
||||||
if (attr >= FingerPrintScan::MAX_ATTR)
|
if (attr >= FingerPrintScan::MAX_ATTR || attr < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
return scan_info.values[static_cast<int>(attr)];
|
return scan_info.values[static_cast<int>(attr)];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user