Refine code to make code run safely.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10880 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10
2010-09-16 04:51:25 +00:00
parent 7bee5a761f
commit cd7bfc2c63
12 changed files with 29 additions and 26 deletions

View File

@@ -197,12 +197,12 @@ UsbCreateDesc (
return NULL;
}
Desc = AllocateZeroPool (CtrlLen);
Desc = AllocateZeroPool ((UINTN) CtrlLen);
if (Desc == NULL) {
return NULL;
}
CopyMem (Desc, Head, DescLen);
CopyMem (Desc, Head, (UINTN) DescLen);
*Consumed = Offset + Head->Len;