Skip to content

Fix WOLFSSL_NO_MALLOC build.#7189

Merged
douzzer merged 1 commit intowolfSSL:masterfrom
philljj:fix_static_nomalloc_build
Jan 31, 2024
Merged

Fix WOLFSSL_NO_MALLOC build.#7189
douzzer merged 1 commit intowolfSSL:masterfrom
philljj:fix_static_nomalloc_build

Conversation

@philljj
Copy link
Copy Markdown
Contributor

@philljj philljj commented Jan 30, 2024

Description

This issue is in the wolfCrypt test application only, not the library proper.

Fix memset overrun build error:

error: 'memset' will always overflow; destination buffer has size 1024, but size argument is 1040 [-Werror,-Wfortify-source]

The static array NO_MALLOC version of large_output is shorter than the dynamic malloc version.

Testing

cd src || exit 1            
                                                             
./configure \                                                
  --enable-staticmemory \
  CPPFLAGS=-DWOLFSSL_NO_MALLOC \                             
 || exit 1                                                   
                                                             
make || exit 1                                               
                                                             
./wolfcrypt/test/testwolfcrypt || exit 1                     
                                                             
echo "built wolfssl"

@philljj philljj self-assigned this Jan 30, 2024
@philljj
Copy link
Copy Markdown
Contributor Author

philljj commented Jan 30, 2024

Retest this please

@philljj philljj assigned wolfSSL-Bot and unassigned philljj Jan 30, 2024
@douzzer douzzer merged commit 1fda249 into wolfSSL:master Jan 31, 2024
@philljj philljj deleted the fix_static_nomalloc_build branch February 3, 2024 00:14
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