Skip to content

Conversation

@jackctj117
Copy link
Contributor

Based on coverity report I added some initialization and potential int overflow issues.

@jackctj117 jackctj117 requested a review from Copilot September 9, 2025 22:28
@jackctj117 jackctj117 self-assigned this Sep 9, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses Coverity static analysis findings by initializing request/response structures and adding type casts to prevent potential integer overflow issues. Key changes include adding explicit zero-initialization to message structures and casting values to uint16_t when creating key IDs.

  • Initialize request and response structures with zero-initialization syntax
  • Add type casts to prevent potential integer overflow in key ID generation
  • Replace usleep with nanosleep for better POSIX compliance
  • Update build system and configuration files for consistency

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/wh_server_keystore.c Initialize req/resp structs and add uint16_t casts for key ID generation
src/wh_server_crypto.c Add conditional checks before function calls and initialize response struct
src/wh_server_counter.c Initialize req/resp structs and add uint16_t casts
src/wh_comm.c Add null pointer checks for hdr field
test/wh_test_comm.c Replace usleep with nanosleep and update timing constants
test/wh_test_common.h Add conditional compilation for debug print macros
test/wh_test_wolfcrypt_test.c Update conditional compilation guards
Various Makefiles and configs Standardize build system and configuration settings

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@bigbrett bigbrett marked this pull request as draft September 11, 2025 16:44
jackctj117 and others added 17 commits September 11, 2025 11:31
* add sha2-224, 384 and 512

* addressed code review

add missing Dma handling

* fix Sha512 tests
enable sha224, sha384 and sh512 as default

enable sha224, sha384 and sha512 at tcp server

* addressed code review comments

* unify Sha2 Dma Request/Response

addressed review comment

* run clang-format
* add sha2-224, 384 and 512

* addressed code review

add missing Dma handling

* fix Sha512 tests
enable sha224, sha384 and sh512 as default

enable sha224, sha384 and sha512 at tcp server

* addressed code review comments

* unify Sha2 Dma Request/Response

addressed review comment

* run clang-format
@bigbrett bigbrett changed the title Intialized req and resp as well as potenial int overflow issues Fix coverity issues Sep 16, 2025
@jackctj117 jackctj117 marked this pull request as ready for review September 18, 2025 16:44
@jackctj117 jackctj117 requested a review from bigbrett September 18, 2025 16:44
@bigbrett bigbrett mentioned this pull request Sep 18, 2025
@jackctj117 jackctj117 requested a review from Copilot September 18, 2025 23:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jackctj117 jackctj117 requested review from bigbrett and removed request for bigbrett September 19, 2025 15:37
Copy link
Contributor

@bigbrett bigbrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jackctj117 run git-clang-format main, and please address the removal of AI slop code in my earlier comments (don't worry about the resp.ok one for now)

@bigbrett bigbrett merged commit 5a5f35b into wolfSSL:main Sep 23, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants