Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
pkg_elf: fix segfault after conversion to pkghash
Baptiste Daroussin committed 4 years ago
commit 6c39feaba30f33cb5a6cc62217a70c5da10874ea
parent bab4e64
1 file changed +1 -2
modified libpkg/pkg_elf.c
@@ -467,7 +467,6 @@ int
pkg_analyse_files(struct pkgdb *db __unused, struct pkg *pkg, const char *stage)
{
	struct pkg_file *file = NULL;
-
	char *sh;
	int ret = EPKG_OK;
	char fpath[MAXPATHLEN +1];
	const char *lib;
@@ -534,7 +533,7 @@ pkg_analyse_files(struct pkgdb *db __unused, struct pkg *pkg, const char *stage)
		file = NULL;
		while (pkg_files(pkg, &file) == EPKG_OK) {
			if ((lib = strstr(file->path, it.key)) != NULL &&
-
			    strlen(lib) == strlen(sh) && lib[-1] == '/') {
+
			    strlen(lib) == strlen(it.key) && lib[-1] == '/') {
				pkg_debug(2, "remove %s from required shlibs as "
				    "the package %s provides this file itself",
				    it.key, pkg->name);