From 39800e901e2258685d1fc34e1e9a7b8a058e11ce Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 16 May 2011 11:57:44 +0300 Subject: [PATCH] Fix segfault on build with empty %prep section Signed-off-by: Panu Matilainen --- build/parsePrep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/parsePrep.c b/build/parsePrep.c index c0508ec..9e61dde 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -504,7 +504,7 @@ int parsePrep(rpmSpec spec) } } - for (ARGV_const_t lines = saveLines; *lines; lines++) { + for (ARGV_const_t lines = saveLines; lines && *lines; lines++) { res = 0; if (rstreqn(*lines, "%setup", sizeof("%setup")-1)) { res = doSetupMacro(spec, *lines); -- 2.7.4