X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkNt32Pkg%2FDxe%2FWinNtThunk%2FBus%2FBlockIo%2FWinNtBlockIo.c;h=014f8a6c069eb64ea4749702f9946ee78e9e9135;hp=2f650927475fed439f82550b78609f2e4d6cef0e;hb=c4bbb32b307b36fec3fafe3b55f0753fcb0908fb;hpb=194479d645de05c67f38f29a4382de114f952f50 diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c index 2f65092747..014f8a6c06 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c @@ -204,14 +204,15 @@ Returns: if (DiskType == EfiWinNtVirtualDisks) { WinNtIo->WinNtThunk->SPrintf ( Buffer, + sizeof (Buffer), L"Diskfile%d", WinNtIo->InstanceNumber ); } else { if (*Str >= 'A' && *Str <= 'Z' || *Str >= 'a' && *Str <= 'z') { - WinNtIo->WinNtThunk->SPrintf (Buffer, L"\\\\.\\%c:", *Str); + WinNtIo->WinNtThunk->SPrintf (Buffer, sizeof (Buffer), L"\\\\.\\%c:", *Str); } else { - WinNtIo->WinNtThunk->SPrintf (Buffer, L"\\\\.\\PHYSICALDRIVE%c", *Str); + WinNtIo->WinNtThunk->SPrintf (Buffer, sizeof (Buffer), L"\\\\.\\PHYSICALDRIVE%c", *Str); } Str++;