summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-04-17 10:00:49 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-04-17 10:00:49 +0000
commit9b64e312866580de57687bef9d007ac9f2c9ce5a (patch)
tree61e66a067fb148f3930ae3323631d1bda35de89e /lib/libalpm
parent0c0a50caf57f0d61d232a9d37ceb796894eb6ade (diff)
downloadpacman-9b64e312866580de57687bef9d007ac9f2c9ce5a.tar.xz
more sanity checks for pkg_load()
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/package.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 7e0854de..0d106893 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -193,7 +193,7 @@ pmpkg_t *pkg_load(char *pkgfile)
(writefunc_t)gzwrite
};
- if(pkgfile == NULL) {
+ if(pkgfile == NULL || strlen(pkgfile) == 0) {
RET_ERR(PM_ERR_WRONG_ARGS, NULL);
}