[systemd-devel] [PATCH] logs-show: fix corrupt output with empty messages
uoti.urpala at pp1.inet.fi
Wed Feb 19 17:00:09 PST 2014
I also noticed a minor C correctness problem in print_multiline(): if
the last line of message has no newline, then end = message+message_len.
The next loop iteration calculates "pos = end + 1". This means that pos
points 2 past the last byte, which is not guaranteed to be a valid
address calculation for general C objects (could theoretically wrap
around to start of address space etc). Probably won't be called with
such objects in practice.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1498 bytes
Desc: not available
More information about the systemd-devel