Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Check shlib arch prior testing it.
Vsevolod Stakhov committed 11 years ago
commit 99d54e31c3ea0e5d391810f6a6d9f2dccc219be0
parent 2d1f272
1 file changed +7 -0
modified libpkg/pkg_elf.c
@@ -222,12 +222,14 @@ analyse_elf(struct pkg *pkg, const char *fpath,
	size_t sh_link = 0;
	size_t dynidx;
	const char *osname;
+
	const char *myarch;
	const char *shlib;

	bool developer = false;
	bool is_shlib = false;

	developer = pkg_object_bool(pkg_config_get("DEVELOPER_MODE"));
+
	myarch = pkg_object_string(pkg_config_get("ABI"));

	int fd;

@@ -303,6 +305,11 @@ analyse_elf(struct pkg *pkg, const char *fpath,
		goto cleanup; /* not a dynamically linked elf: no results */
	}

+
	if (!shlib_valid_abi(&elfhdr, myarch)) {
+
		ret = EPKG_END;
+
		goto cleanup; /* Invalid ABI */
+
	}
+

	if (note != NULL) {
		if ((data = elf_getdata(note, NULL)) == NULL) {
			ret = EPKG_END; /* Some error occurred, ignore this file */