xman: Changes to 'master'
Alan Coopersmith
alanc at kemper.freedesktop.org
Tue Oct 29 04:27:39 CET 2013
man.c | 7 ++++++-
misc.c | 4 +++-
search.c | 6 ++++--
3 files changed, 13 insertions(+), 4 deletions(-)
New commits:
commit a2976b6403ce3a98e8bb4f8db8c1703588800ee8
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Oct 18 23:23:44 2013 -0700
Ensure fgets read at least one byte before modifying string
If a file has a \0 byte (binary file, strange encoding, corruption),
fgets() can return a string starting with a \0 byte - check for that
before checking to see if the byte before the \0 is a \n, so we don't
reach back before the start of our memory buffer.
Also check that the penultimate byte is a \n before we chop it off,
in case we're reading from a file missing a newline, or a line longer
than fit in the buffer provided to fgets().
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
More information about the xorg-commit
mailing list