mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Add NULL value check to fix #45289
* src/recur.c (retrieve_tree): Check return value of url_parse()
This commit is contained in:
parent
bd0ffcf8bc
commit
80303366ae
11
src/recur.c
11
src/recur.c
@ -298,6 +298,16 @@ retrieve_tree (struct url *start_url_parsed, struct iri *pi)
|
||||
char *redirected = NULL;
|
||||
struct url *url_parsed = url_parse (url, &url_err, i, true);
|
||||
|
||||
if (!url_parsed)
|
||||
{
|
||||
char *error = url_error (url, url_err);
|
||||
logprintf (LOG_NOTQUIET, "%s: %s.\n",url, error);
|
||||
xfree (error);
|
||||
inform_exit_status (URLERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
status = retrieve_url (url_parsed, url, &file, &redirected, referer,
|
||||
&dt, false, i, true);
|
||||
|
||||
@ -345,6 +355,7 @@ retrieve_tree (struct url *start_url_parsed, struct iri *pi)
|
||||
}
|
||||
url_free (url_parsed);
|
||||
}
|
||||
}
|
||||
|
||||
if (opt.spider)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user