mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Check if the added target is too long. Currently we are using std::string objects to store new targets but we want to make sure that the script is not adding long strings.
This commit is contained in:
parent
0ee33e4cb7
commit
4ea062b1e3
1 changed files with 4 additions and 0 deletions
|
|
@ -675,6 +675,10 @@ unsigned long NewTargets::insert (const char *target) {
|
|||
error("ERROR: adding targets is disabled in the Post-scanning phase.");
|
||||
return 0;
|
||||
}
|
||||
if (strlen(target) >= 1024) {
|
||||
error("ERROR: new target is too long (>= 1024), failed to add it.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return new_targets->push(target);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue