From 479a4a9d75a1973247f1a937228ec96479f88c31 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 19 Jan 2009 14:37:09 +0200 Subject: [PATCH] Don't segfault on "" rcfiles argument (spotted by Pixel) --- lib/rpmrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rpmrc.c b/lib/rpmrc.c index b7fdd2c..5909cc7 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -1643,7 +1643,7 @@ static rpmRC rpmReadRC(const char * rcfiles) argvFree(globs); /* Read each file in rcfiles. */ - for (p = files; *p; p++) { + for (p = files; p && *p; p++) { /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */ if (access(*p, R_OK) != 0) { if (rcfiles == defrcfiles && p != files) -- 2.7.4