Skip to content

Clear calloc block only if malloc succeeds #4208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2018

Conversation

earlephilhower
Copy link
Collaborator

Calloc was calling memset(0) on NULL when its implicit malloc failed,
causing a crash in UMM. Instead, only do the memset if the memory
allocation succeeds.

Fixes issue #4207

Calloc was calling memset(0) on NULL when its implicit malloc failed,
causing a crash in UMM.  Instead, only do the memset if the memory
allocation succeeds.

Fixes issue esp8266#4207
@igrr igrr merged commit 589eb29 into esp8266:master Jan 21, 2018
@earlephilhower earlephilhower deleted the callocfix branch March 9, 2018 05:41
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.

2 participants