Skip to content

Comments

Don't alloc zero bytes on an empty array#119

Closed
LinuxJedi wants to merge 1 commit intowolfSSL:masterfrom
LinuxJedi:fix-alloc-array
Closed

Don't alloc zero bytes on an empty array#119
LinuxJedi wants to merge 1 commit intowolfSSL:masterfrom
LinuxJedi:fix-alloc-array

Conversation

@LinuxJedi
Copy link
Member

@LinuxJedi LinuxJedi commented Jul 30, 2025

Appears to break on an STM32

ZD 20306

/* Read length of array. */
ret = wp11_storage_read_int(storage, len);
if (ret == 0) {
if (*len == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Going to see about solving the malloc of 0 instead. I am going to open a new PR with a few other fixes.

@dgarske dgarske closed this Jul 30, 2025
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.

3 participants