* src/http.c (gethttp): Add cheap extra check to help static analyzers

This commit is contained in:
Tim Rühsen
2021-06-06 15:10:28 +02:00
parent 4d3ee1604a
commit c778ac20b4

View File

@@ -3666,7 +3666,7 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs,
xfree (hs->error);
if (statcode == -1)
hs->error = xstrdup (_("Malformed status line"));
else if (!*message)
else if (!message || !*message)
hs->error = xstrdup (_("(no description)"));
else
hs->error = xstrdup (message);