Skip to content

ForceZero change for WOLFSSL_CHECK_MEM_ZERO#9146

Merged
SparkiDev merged 3 commits into
wolfSSL:masterfrom
rlm2002:gh9128_MEM_ZERO
Aug 28, 2025
Merged

ForceZero change for WOLFSSL_CHECK_MEM_ZERO#9146
SparkiDev merged 3 commits into
wolfSSL:masterfrom
rlm2002:gh9128_MEM_ZERO

Conversation

@rlm2002

@rlm2002 rlm2002 commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

Description

Changes call to ForceZero() in ShrinkInputBuffer() to use bufferSize instead of length. Allows call to wc_MemZero_Check() in XFREE() to run without aborting early.

Adds macro guard to prevent aborting early if TEST_ALWAYS_RUN_TO_END is defined.

Adds configuration --enable-all CFLAGS="-DWOLFSSL_CHECK_MEM_ZERO" to os-check.yml

Fixes Github issue #9128

Testing

./configure --enable-all CFLAGS="-DWOLFSSL_CHECK_MEM_ZERO" && make
make check

# single test, number retrieved from ./tests/unit.text --list
./tests/unit.test -1157

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@rlm2002 rlm2002 self-assigned this Aug 27, 2025
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🛟 Devin Lifeguard found 1 likely issues in this PR

  • no-void-functions snippet snippet: Change both wc_MemZero_Init and wc_MemZero_Free to return an int (e.g., 0 on success, negative on error) and adjust all call sites accordingly.

@rlm2002
please take a look at the above issues which Devin flagged. Devin will not fix these issues automatically.

SparkiDev
SparkiDev previously approved these changes Aug 27, 2025
@dgarske dgarske assigned wolfSSL-Bot and SparkiDev and unassigned rlm2002 Aug 28, 2025
@SparkiDev

Copy link
Copy Markdown
Contributor

retest this please

@SparkiDev
SparkiDev merged commit 0224ef3 into wolfSSL:master Aug 28, 2025
330 of 333 checks passed
@rlm2002
rlm2002 deleted the gh9128_MEM_ZERO branch June 16, 2026 19:55
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