summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-04 23:13:51 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-04 23:13:51 +0000
commitc4bbb32b307b36fec3fafe3b55f0753fcb0908fb (patch)
tree77b1f227c1f6cd0c43ff75a5bee78cc3b59b4bb3 /EdkNt32Pkg
parent194479d645de05c67f38f29a4382de114f952f50 (diff)
downloadedk2-platforms-c4bbb32b307b36fec3fafe3b55f0753fcb0908fb.tar.xz
Fix VS 2005 compatibility issue
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1668 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkNt32Pkg')
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c5
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c2
2 files changed, 4 insertions, 3 deletions
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++;
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c
index 73a345a431..d591151c14 100644
--- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c
+++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c
@@ -462,7 +462,7 @@ Returns:
WinNtDevice->ControllerNameTable = NULL;
- WinNtThunk->SPrintf (ComponentName, L"%s", WinNtDevice->WinNtIo.EnvString);
+ WinNtThunk->SPrintf (ComponentName, sizeof (ComponentName), L"%s", WinNtDevice->WinNtIo.EnvString);
WinNtDevice->DevicePath = WinNtBusCreateDevicePath (
ParentDevicePath,