From: Michael Schroeder Date: Mon, 16 May 2011 08:57:44 +0000 (+0300) Subject: Fix segfault on build with empty %prep section X-Git-Tag: tznext/4.11.0.1.tizen20130304~1157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39800e901e2258685d1fc34e1e9a7b8a058e11ce;p=tools%2Flibrpm-tizen.git Fix segfault on build with empty %prep section Signed-off-by: Panu Matilainen --- 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);