1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

tests/: Assert on NULL heap allocations in tests

Change-Id: Id2adcfe859fb25d2a7f0734655c6b9a58c0890b6
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/71919
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:
Edward O'Callaghan
2023-01-15 14:50:25 +11:00
committed by Anastasia Klimchuk
parent 46856234b3
commit dd41980f17
4 changed files with 13 additions and 0 deletions

View File

@ -45,6 +45,7 @@ void strcat_realloc_test_success(void **state)
const char src0[] = "hello";
const char src1[] = " world";
char *dest = calloc(1, 1);
assert_non_null(dest);
dest = strcat_realloc(dest, src0);
dest = strcat_realloc(dest, src1);
assert_string_equal("hello world", dest);