Commit graph

3 commits

Author SHA1 Message Date
Frans Kaashoek 7894fcd217 Remove trailing white space with:
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done
(Thanks to Nicolás Wolovick)
2016-08-25 09:13:00 -04:00
Austin Clements 7443b9649a Fix missing NUL-terminator in grep
Currently, grep read()s into a buffer and then uses the buffer as a
string. Since there's no NUL-terminator, this can cause it to falsely
identify line breaks and matches from leftover data on earlier lines
and, if a line fills up the entire buffer, to read past the end of the
buffer.

Fix this by NUL-terminating any data returned by read().

Thanks to Keiichi Watanabe for the report.
2015-03-24 20:54:39 -04:00
rsc 1a89baa7c6 add grep; add lost echo 2007-08-28 04:26:34 +00:00