mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 00:19:01 +00:00
getting closer to 4.20ALPHA9
This commit is contained in:
@@ -236,9 +236,8 @@ static char *next_token(char *buf, char *token, int tokensz)
|
||||
|
||||
static char *build_command()
|
||||
{
|
||||
int size = 2560; /* this should be long enough ;-) */
|
||||
static char *command = NULL;
|
||||
static int command_size = 0;
|
||||
int command_size = 2560;
|
||||
|
||||
/* Find how much to malloc() */
|
||||
// size = strlen(gtk_entry_get_text(GTK_ENTRY(opt.range_text))) +
|
||||
@@ -250,8 +249,8 @@ static int command_size = 0;
|
||||
// 2560;
|
||||
/* We get 60 from the chars required for each option */
|
||||
|
||||
if (size > command_size)
|
||||
command = realloc(command, size);
|
||||
if (!command)
|
||||
command = safe_malloc(command_size);
|
||||
|
||||
strcpy(command, "nmap ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user