Menu

#24 `_duma_allocate` can't allocate > `DUMA_PAGE_SIZE` bytes

open
nobody
None
5
2009-12-30
2009-12-30
No

In `duma.c`, the code that follows the comment "I get here if I haven't been able to find a free buffer..." only attempts to allocate `chunkSize` bytes of memory. This means that, executing this block of code, if `userSize` is greater than `chunkSize` (i.e. the user attempts to allocate more than `DUMA_PAGE_SIZE` bytes), only `chunkSize` bytes are allocated, but the call to `_duma_init_slack` later on attempts to write to `userSize` bytes.

Discussion


Log in to post a comment.

Monday.com Logo