2020714 Coverity fixes#10902
Conversation
|
Retest this please Jenkins: Aarch64 Silicon Test - ERROR: Error cloning remote repo 'origin' |
|
Retest this please Jenkins |
|
@rlm2002 Looks like the Jenkins history might have been lost? Can you get this past the CI tests then re-assign to wolfssl-bot when ready? |
There was a problem hiding this comment.
Pull request overview
This pull request applies targeted Coverity-driven fixes across wolfSSL tests and internal logic, addressing null dereferences, dead code, untrusted bounds, and uninitialized variables while keeping behavior consistent.
Changes:
- Tighten null checking and remove a redundant/null-guarded dereference in the crypto device callback test helper.
- Add initialization (
XMEMSET) for several test-local structs/buffers to eliminate “uninitialized scalar/array” reports. - Add/adjust bounds checks for ECH extension parsing and remove logically dead bounds code in OCSP multi-stapling.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfcrypt/test/test.c | Ensures myCtx is validated before use and simplifies a now-redundant null check. |
| tests/api/test_ossl_x509_vp.c | Updates assertions to avoid time_t narrowing in ExpectIntEQ. |
| tests/api/test_ed25519.c | Zero-initializes sig to avoid uninitialized-use reports in failure paths. |
| tests/api/test_dh.c | Zero-initializes DH key structs before init calls to satisfy analysis tooling. |
| tests/api.c | Adds an explicit bound check for ECH extension total length before iterating. |
| src/internal.c | Removes dead bounds code in OCSP multi-response generation loop. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Retest this please Jenkins: FIPS tests failed, retrying with PR fix |
Description
Various coverity fixes
Use of 32-bit time_t - 561736: compare to
paramTo->check_timedirectly to value.Logically dead code - 561704: Remove dead check
Dereference before null check - 561665: Move
myCtxcheckUntrusted loop bound - 561218: Add bounds checks
Uninitialized scalar variable - 561786/561785/561784/561783/561782/561781: Add
XMEMSET()to init varsTesting
./configure --enable-all && make check