Do not segfault if the prep section is empty --- build/parsePrep.c.orig 2011-05-13 16:22:59.000000000 +0000 +++ build/parsePrep.c 2011-05-13 16:23:41.000000000 +0000 @@ -518,7 +518,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);