Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Prevent calling stat on an uninitialized path variable
Baptiste Daroussin committed 10 years ago
commit 7b4c05c31850fd55eecb9d6886dc8ae54f910e90
parent 8bae03c
1 file changed +2 -1
modified src/utils.c
@@ -726,7 +726,8 @@ set_jobs_summary_pkg(struct pkg_jobs *jobs,
		else if (repopath != NULL) {
			snprintf(path, sizeof(path), "%s/%s", destdir, repopath);
			ret = EPKG_OK;
-
		}
+
		} else
+
			break;

		if ((ret == EPKG_OK || ret == EPKG_FATAL) && (stat(path, &st) == -1 || pkgsize != st.st_size))
			/* file looks corrupted (wrong size),