[PATCH] "pacman -Q --changelog": fix writing uninit'd mem
Previously, when printing a package changelog to stdout, we would write
chunks of data that were not necessarily nul-terminated to stdout using
a function (fputs) which requires the input string to be nul-terminated.
On my system, this would result in occasional garbage characters showing
up in the "pacman -Qc" output.
Fix this by never nul-terminating the chunk, and using the fwrite()
function which takes an explicit input size and does not require a
nul-terminated string.
Signed-off-by: Carlo Teubner
participants (2)
-
Carlo Teubner
-
Kevin Morris