[Toybox] [PATCH] grep: fix two bugs found by hwasan.

enh enh at google.com
Tue Jul 16 15:05:54 PDT 2019


The first bug appeared as a memory overwrite, but was actually visible
without hwasan: basically any `grep -F` that let to multiple matches on
the same line was broken.

The second bug was another memory overwrite, visible when I ran the
existing grep tests.

Bug: http://b/137573082
---
 tests/grep.test   | 13 +++++++++++++
 toys/posix/grep.c | 15 ++++++++-------
 2 files changed, 21 insertions(+), 7 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-grep-fix-two-bugs-found-by-hwasan.patch
Type: text/x-patch
Size: 3606 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190716/82e76ddd/attachment-0002.bin>


More information about the Toybox mailing list