Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Prevent potential buffer overflow found using llvm fsanitize=address
Baptiste Daroussin committed 10 years ago
commit 3cee614f1dd5f67e3e2f2ec843aad525210a87c1
parent 797cbc11bc1aa63bef25633435f78cc188596118
1 file changed +1 -1
modified libpkg/pkg_delete.c
@@ -298,7 +298,7 @@ pkg_delete_file(struct pkg *pkg, struct pkg_file *file, unsigned force)
	prefix_rel = pkg->prefix;
	prefix_rel++;
	len = strlen(prefix_rel);
-
	while (prefix_rel[len - 1] == '/')
+
	while (len > 0 && prefix_rel[len - 1] == '/')
		len--;

	/* Regular files and links */