From 4cb176ffff9ac35e1aa47cd99ee1baac258f566f Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 28 Mar 2024 11:44:12 -0400 Subject: [PATCH] Fix sanitizer complaint --- wolfcrypt/test/test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 137e943b7..d929d6819 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -16488,6 +16488,9 @@ static wc_test_ret_t cert_load_bad(const char* fname, byte* tmp, int err) XFILE file; size_t bytes; + if ((fname == NULL) || (tmp == NULL)) { + ERROR_OUT(WC_TEST_RET_ENC_NC, done); + } file = XFOPEN(fname, "rb"); if (!file) { ERROR_OUT(WC_TEST_RET_ENC_ERRNO, done);