Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
repo: fix potential buffer underflow
Baptiste Daroussin committed 2 months ago
commit db9e391e0880f0753c1df76f2c7ddc73bf4cfefe
parent 2a6170e
1 file changed +2 -0
modified libpkg/pkg_repo.c
@@ -130,6 +130,8 @@ pkg_repo_file_has_ext(const char *path, const char *ext)

	n = strlen(path);
	l = strlen(ext);
+
	if (l > n)
+
		return (false);
	p = &path[n - l];

	if (STREQ(p, ext))