Don't treat quoted empty string as NULL

This commit is contained in:
dmiller 2026-05-28 22:00:09 +00:00
parent 7a0dbf40a0
commit c86132442b
2 changed files with 3 additions and 1 deletions

View file

@ -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;
}

View file

@ -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");