summaryrefslogtreecommitdiffstats
path: root/tests/lib/memchr-test.c
Commit message (Collapse)AuthorAgeFilesLines
* tests/lib/memchr-test: Fix possible memory overrun, add non-null checksJakub Czapiga2021-02-261-3/+7
| | | | | | | | | | | | 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>
* tests: Add lib/memchr-test test caseJakub Czapiga2021-02-221-0/+101
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>