Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix segfault if ABI is defined to ""
Baptiste Daroussin committed 9 years ago
commit c05c940a4aa041409098689cc1c2a92bb715d9fb
parent 91ddc55
1 file changed +2 -1
modified libpkg/pkg_config.c
@@ -1126,7 +1126,8 @@ pkg_ini(const char *path, const char *reposdir, pkg_init_flags flags)
	ucl_object_unref(obj);
	ucl_parser_free(p);

-
	if (strcmp(pkg_object_string(pkg_config_get("ABI")), "unknown") == 0) {
+
	if (pkg_object_string(pkg_config_get("ABI")) == NULL ||
+
	    strcmp(pkg_object_string(pkg_config_get("ABI")), "unknown") == 0) {
		pkg_emit_error("Unable to determine ABI");
		return (EPKG_FATAL);
	}