From 99384e1f5e9f35d642a1c1bdfe102a237100537a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 13 Aug 2009 17:30:39 +0200 Subject: [PATCH] xbps_configure_pkg: add a safety check. --HG-- extra : convert_revision : 4e3c7b7a52603baf0e447d1e32f9598df3b5b979 --- lib/configure.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/configure.c b/lib/configure.c index 8a695a3e725..7e93222c5be 100644 --- a/lib/configure.c +++ b/lib/configure.c @@ -59,6 +59,9 @@ xbps_configure_pkg(const char *pkgname) return EINVAL; pkgd = xbps_find_pkg_installed_from_plist(pkgname); + if (pkgd == NULL) + return ENOENT; + prop_dictionary_get_cstring_nocopy(pkgd, "version", &version); prop_object_release(pkgd);