Skip to content

Commit

Permalink
DosAllocMem() promises that allocated memory will be zeroed out, appa…
Browse files Browse the repository at this point in the history
…rently.

Fixes lots of stuff.  :)
  • Loading branch information
icculus committed Dec 21, 2017
1 parent 20d2bfa commit 3864bc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion native/doscalls.c
Expand Up @@ -748,7 +748,7 @@ APIRET DosAllocMem(PPVOID ppb, ULONG cb, ULONG flag)
TRACE_NATIVE("DosAllocMem(%p, %u, %u)", ppb, (uint) cb, (uint) flag);

// !!! FIXME: this API is actually much more complicated than this.
*ppb = malloc(cb);
*ppb = calloc(1, cb);
if (!*ppb)
return ERROR_NOT_ENOUGH_MEMORY;
return NO_ERROR;
Expand Down

0 comments on commit 3864bc9

Please sign in to comment.