[Rpm-maint] [PATCH] Fixed buffer problems in doShellEscape

Panu Matilainen pmatilai at laiskiainen.org
Tue Feb 12 06:35:44 UTC 2013


On 02/07/2013 06:22 AM, Alexey Tourbin wrote:
> When the output from a command is empty, nothing stops doShellEscape from
> chopping newlines past the beginning of the buffer.  This problem was first
> identified by Dmitry V. Levin in July 2009.
>
> Also, there is an off-by-one error in replacing trailing '\n' with '\0'.
> This problem, however, escaped the attention of Dmitry V. Levin in July 2009.

ACK, at least the first bugger & the fix easily verifiable with eg

     valgrind rpm --eval '%(echo "")'

Applied, thanks for the patch!

	- Panu -


More information about the Rpm-maint mailing list