mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
more sanity checks for pkg_load()
This commit is contained in:
parent
0c0a50caf5
commit
9b64e31286
@ -193,7 +193,7 @@ pmpkg_t *pkg_load(char *pkgfile)
|
|||||||
(writefunc_t)gzwrite
|
(writefunc_t)gzwrite
|
||||||
};
|
};
|
||||||
|
|
||||||
if(pkgfile == NULL) {
|
if(pkgfile == NULL || strlen(pkgfile) == 0) {
|
||||||
RET_ERR(PM_ERR_WRONG_ARGS, NULL);
|
RET_ERR(PM_ERR_WRONG_ARGS, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user