Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix segfault when parsing invalid URLs (PR 205003)
Tobias Kortkamp committed 10 years ago
commit 7ff275777142cae9c010611f51570489a08adc3b
parent c2d5800ff9ea7ad900ae731a479e8431202f8154
1 file changed +6 -0
modified libpkg/fetch.c
@@ -513,6 +513,12 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest,
	}

	u = fetchParseURL(url);
+
	if (u == NULL) {
+
		pkg_emit_error("%s: parse error", url);
+
		/* Too early for there to be anything to cleanup */
+
		return(EPKG_FATAL);
+
	}
+

	if (t != NULL)
		u->ims_time = *t;