diff --git a/src/ChangeLog b/src/ChangeLog index 7de71b35..d727a40e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,6 +6,7 @@ * getopt.c: Fix missing (but, accidentally, legal) comment delimiter after licensing text. * recur.c (retrieve_tree): Inserted missing cast for strip_auth. + Includes adjustment by Ralf Wildenhues. * openssl.c (ssl_init): const-ified the meth local variable. * main.c: Include all the static function definitions in the "#ifndef TESTING" clause, leaving just the definitions for diff --git a/src/recur.c b/src/recur.c index 9de774c4..57932f8d 100644 --- a/src/recur.c +++ b/src/recur.c @@ -325,7 +325,8 @@ retrieve_tree (const char *start_url) struct urlpos *child = children; struct url *url_parsed = url_parsed = url_parse (url, NULL); char *referer_url = url; - bool strip_auth = (bool)url_parsed->user; + bool strip_auth = (url_parsed != NULL + && url_parsed->user != NULL); assert (url_parsed != NULL); /* Strip auth info if present */