From 8e9c6a0e1f629c08fd45cfbd5acfeb508396644e Mon Sep 17 00:00:00 2001 From: josh Date: Sat, 6 Jun 2009 02:18:18 +0000 Subject: [PATCH] Fixed a bug with in validate_scan_lists where realloc was not called with sufficient size. --- nmap.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nmap.cc b/nmap.cc index a9125eaba..d9c621234 100644 --- a/nmap.cc +++ b/nmap.cc @@ -507,7 +507,8 @@ void validate_scan_lists(scan_lists &ports, NmapOps &o){ // if there were duplicate ports then we can save some memory if (merged_port_count < (ports.ack_ping_count + ports.syn_ping_count)) { merged_port_list = (unsigned short*) - safe_realloc(merged_port_list, merged_port_count); + safe_realloc(merged_port_list, + merged_port_count * sizeof(unsigned short)); } // clean up a bit