mirror of
https://github.com/nmap/nmap.git
synced 2026-07-10 18:24:41 +00:00
Don't treat quoted empty string as NULL
This commit is contained in:
parent
7a0dbf40a0
commit
c86132442b
2 changed files with 3 additions and 1 deletions
|
|
@ -642,7 +642,7 @@ static const char *read_quoted_string(const char *s, char **quoted_string)
|
|||
}
|
||||
s++;
|
||||
|
||||
*quoted_string = buf;
|
||||
*quoted_string = buf ? buf : Strdup("");
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,8 @@ char *Strdup(const char *s)
|
|||
{
|
||||
char *ret;
|
||||
|
||||
if (s == NULL)
|
||||
bye("Strdup argument must not be NULL");
|
||||
ret = strdup(s);
|
||||
if (ret == NULL)
|
||||
die("strdup");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue