Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=425778b7183cf306a5c2ff04f702673dcdd3de9d

commit 425778b7183cf306a5c2ff04f702673dcdd3de9d
Author: Michel Hermier <[email protected]>
Date:   Thu Oct 31 09:27:40 2013 +0100

libpacman: Protect _pacman_db_get_pkgfromcache from empty target string.

diff --git a/lib/libpacman/cache.c b/lib/libpacman/cache.c
index c06447c..1bd5e74 100644
--- a/lib/libpacman/cache.c
+++ b/lib/libpacman/cache.c
@@ -146,7 +146,7 @@ int _pacman_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg)

pmpkg_t *_pacman_db_get_pkgfromcache(pmdb_t *db, const char *target)
{
-       if(db == NULL) {
+       if(db == NULL || _pacman_strempty(target)) {
return(NULL);
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to