8000 Fix, calloc now fails on extra-large request. by mhightower83 · Pull Request #8482 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Fix, calloc now fails on extra-large request. #8482

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 4 commits into from
Feb 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added missed overflow testing to _calloc_r
  • Loading branch information
mhightower83 committed Feb 12, 2022
commit f1b73562df0edff70a8abe45a054cd0987ee33f7
2 changes: 1 addition & 1 deletion cores/esp8266/heap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void* _calloc_r(struct _reent* unused, size_t count, size_t size)
{
(void) unused;
void *ret = calloc(count, size);
PTR_CHECK__LOG_LAST_FAIL(ret, count * size);
PTR_CHECK__LOG_LAST_FAIL(ret, umm_umul_sat(count, size));
return ret;
}

Expand Down
0