[Rpm-maint] rpm-4.9 segfault on build with empty prep section
Michael Schroeder
mls at suse.de
Fri May 13 16:29:44 UTC 2011
Hi,
rpm-4.9 will crash if the %prep section is empty, i.e. if
the specfile looks like:
%prep
%build
...
Patch (untested):
--- 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);
Cheers,
Michael.
--
Michael Schroeder mls at suse.de
SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
More information about the Rpm-maint
mailing list