Browse Source

Merge pull request #7373 from bandi13/FixMultiTestWarning

Fix sanitizer complaint in multi-test script
Daniel Pouzzner 1 month ago
parent
commit
7a283edd68
1 changed files with 3 additions and 0 deletions
  1. 3 0
      wolfcrypt/test/test.c

+ 3 - 0
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);