mirror of
https://github.com/nmap/nmap.git
synced 2026-08-28 04:25:15 +00:00
getting closer to 4.20ALPHA9
This commit is contained in:
parent
25bbd2983d
commit
e4ee4d5e4c
13 changed files with 93 additions and 64 deletions
|
|
@ -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 ");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue