Fix VS 2005 compatibility issue
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 4 Oct 2006 23:13:51 +0000 (23:13 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 4 Oct 2006 23:13:51 +0000 (23:13 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1668 6f19259b-4bc3-4df7-8a09-765794883524

EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c
EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c

index 2f65092..014f8a6 100644 (file)
@@ -204,14 +204,15 @@ Returns:
   if (DiskType == EfiWinNtVirtualDisks) {\r
     WinNtIo->WinNtThunk->SPrintf (\r
                           Buffer,\r
+                          sizeof (Buffer),\r
                           L"Diskfile%d",\r
                           WinNtIo->InstanceNumber\r
                           );\r
   } else {\r
     if (*Str >= 'A' && *Str <= 'Z' || *Str >= 'a' && *Str <= 'z') {\r
-      WinNtIo->WinNtThunk->SPrintf (Buffer, L"\\\\.\\%c:", *Str);\r
+      WinNtIo->WinNtThunk->SPrintf (Buffer, sizeof (Buffer), L"\\\\.\\%c:", *Str);\r
     } else {\r
-      WinNtIo->WinNtThunk->SPrintf (Buffer, L"\\\\.\\PHYSICALDRIVE%c", *Str);\r
+      WinNtIo->WinNtThunk->SPrintf (Buffer, sizeof (Buffer), L"\\\\.\\PHYSICALDRIVE%c", *Str);\r
     }\r
 \r
     Str++;\r
index 73a345a..d591151 100644 (file)
@@ -462,7 +462,7 @@ Returns:
 \r
         WinNtDevice->ControllerNameTable = NULL;\r
 \r
-        WinNtThunk->SPrintf (ComponentName, L"%s", WinNtDevice->WinNtIo.EnvString);\r
+        WinNtThunk->SPrintf (ComponentName, sizeof (ComponentName), L"%s", WinNtDevice->WinNtIo.EnvString);\r
 \r
         WinNtDevice->DevicePath = WinNtBusCreateDevicePath (\r
                                     ParentDevicePath,\r