On 03/30/2017 04:11 PM, Bernd Edlinger wrote:
Hi,
I'd like to fix a few buffer overruns I have found in the gcov tools.
First I noticed that the -x output contains most of the time "ff" bytes,
and that when different source files exist in different directories,
with same base name the MD5 sum always matches, which results in
gcov overwriting the previous result file always, except if -l is given,
which makes hashing the file names practically useless.
And secondly I wanted to fix potential buffer underflow if a file
contains lines with begin with NUL ascii characters, and a out of
memory due to always doubling the buffer space, even if the line
buffer is not yet filled up.
Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
Is it OK for trunk?
ok. Could you put a comment on the buffer reallocation test about NUL defense,
thanks!
nathan
--
Nathan Sidwell