Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
fix(#33): out-of-bound write
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroKaku committed Oct 8, 2023
1 parent 399179e commit ad85f8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ucrt/heap/kmalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern"C" __declspec(noinline) void* __cdecl ExReallocatePoolWithTag(
if (NewBlock)
{
memset (NewBlock, 0, NewSize);
memmove(NewBlock, OldBlock, OldSize);
memmove(NewBlock, OldBlock, NewSize < OldSize ? NewSize : OldSize);

ExFreePoolWithTag(OldBlock, Tag);
return NewBlock;
Expand Down

0 comments on commit ad85f8f

Please sign in to comment.