In construct like
the %amacro inside gets %* macro pointing to an uninitialised memory,
ie. %* expands to a garbage.
Though it can be fixed by an assignment like *be='\0',
I decided to clean up whole grabArgs() function in rpm-3.0.4/lib/macro.c
Patch follows, I hope.
Created attachment 247 [details]
bugfix -- grabArgs() cleaned up
Can you include the defininition of the macro suse_update_config? Thanks.
The bug does not depend on macro definition.
should be enough.
The macro %* is always defined but in this situation (macro call isn't
terminated by \n, eg.) the %* replacement text point's to an uninitialised
memory. This is why the bug is not deterministic.
Please read whole patch--it also deletes several unused variables.
Created attachment 255 [details]
bugfix -- this one works, the previous was wrong
Fixed in rpm-4.0-0.43 and rpm-3.0.5-0.4. Thanks for the patch, the cleanup
has been overdue for a long time now ...