diff --git a/MdePkg/Library/BaseMemoryLib/SetMem.c b/MdePkg/Library/BaseMemoryLib/SetMem.c index 69fa265ba2..dee44f61ce 100644 --- a/MdePkg/Library/BaseMemoryLib/SetMem.c +++ b/MdePkg/Library/BaseMemoryLib/SetMem.c @@ -46,7 +46,7 @@ InternalMemSetMem ( volatile UINT8 *Pointer; Pointer = (UINT8*)Buffer; - while (Size-- != 0) { + while (Length-- != 0) { *(Pointer++) = Value; } return Buffer;