Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
libpkg: Do not dereference NULL pointer
Joseph Mingrone committed 4 years ago
commit d4cc9c31bc2ac39da7114147931b8b400f8422a7
parent 225062d025f8ff9ae59e72124e6ef37ba64787a3
1 file changed +6 -4
modified libpkg/pkg_jobs.c
@@ -779,11 +779,13 @@ pkg_jobs_process_remote_pkg(struct pkg_jobs *j, struct pkg *rp,
				}
			}
			/* Also process all rdeps recursively */
-
			while (pkg_rdeps(nrit->pkg, &rdep) == EPKG_OK) {
-
				lp = pkg_jobs_universe_get_local(j->universe, rdep->uid, 0);
+
			if (nrit != NULL) {
+
				while (pkg_rdeps(nrit->pkg, &rdep) == EPKG_OK) {
+
					lp = pkg_jobs_universe_get_local(j->universe, rdep->uid, 0);

-
				if (lp) {
-
					(void)pkg_jobs_process_remote_pkg(j, lp, NULL, 0);
+
					if (lp) {
+
						(void)pkg_jobs_process_remote_pkg(j, lp, NULL, 0);
+
					}
				}
			}
		}