Commit Graph

2 Commits

Author SHA1 Message Date
Jakub Czapiga 68220b5c42 tests/lib/memchr-test: Fix possible memory overrun, add non-null checks
Three calls to memchr() had incorrect length values which could lead to
memory overrun.
Add non-null checks to ensure correct return values from memchr()

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Ief7b7e2ecb9b5d2e05e6983d92d02fa00935b392
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51054
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
2021-02-26 07:30:00 +00:00
Jakub Czapiga cc7acb82c0 tests: Add lib/memchr-test test case
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Idcc824bfd9ca950f377c8f6a5916ffaba450fe73
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50721
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
2021-02-22 07:31:06 +00:00