Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Protect the elf analysis against libs when SONAME is empty
Baptiste Daroussin committed 9 years ago
commit a3a2a2863d598702051a9e888d5194623c82ce51
parent a32018d
1 file changed +3 -2
modified libpkg/pkg_elf.c
@@ -385,8 +385,9 @@ analyse_elf(struct pkg *pkg, const char *fpath)
			/* The file being scanned is a shared library
			   *provided* by the package. Record this if
			   appropriate */
-

-
			pkg_addshlib_provided(pkg, elf_strptr(e, sh_link, dyn->d_un.d_val));
+
			shlib = elf_strptr(e, sh_link, dyn->d_un.d_val);
+
			if (shlib != NULL && *shlib != '\0')
+
				pkg_addshlib_provided(pkg, shlib);
		}

		if (dyn->d_tag != DT_RPATH && dyn->d_tag != DT_RUNPATH)