commit | 56be8539e85909190d18bf9ba56022397aca2172 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Mar 29 21:59:17 2019 -0700 |
committer | Elliott Hughes <enh@google.com> | Mon Apr 01 10:58:38 2019 -0700 |
tree | 26ef63cb434691f2f1ce9eb7c794bfc09eb3644e | |
parent | e398baa35b5873e32fef4398a3ac6d8b70ecd091 [diff] |
grep: fix ASan heap-buffer-overflow. Like the regular fgetln(), grep_fgetln() doesn't NUL-terminate the string, which regexec() doesn't like. ASan just gained the ability to intercept regexec(), which is why we didn't find this previously. Bug: http://b/129089665 Test: adb shell grep -R /system -e "abc" Test: toybox grep tests Change-Id: Id707cea66a873b83bd763a3dcdf726ac7d062ce0