diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-05-24 16:36:35 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-26 00:21:46 -0700 |
commit | 5b7c78edd7714a38f80ccf1525f967b496410c43 (patch) | |
tree | 5c40cb64ef59c49d269f44d47937e6607623a2f5 /include/config.h | |
parent | c50523e1d1e164d8babf9ea2d8dedb741424a66c (diff) | |
download | chrome-ec-5b7c78edd7714a38f80ccf1525f967b496410c43.tar.gz |
test/utils: Fix memchr test
memchr does not take into account end of string, so the test
`memchr("123", '4', 8)` actually does a buffer overflow. On some
boards, a '4' might be found in the 4 bytes that follow "123", and
the test might fail.
Fix another potential overflow as well.
BRANCH=none
BUG=none
TEST=Flash test-utils to hammer, test passes
Change-Id: I53755c0855bbd5b180801e4198341de1cec7b425
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1071409
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/config.h')
0 files changed, 0 insertions, 0 deletions