Qiu Shumin
2015-06-25 07:47:05 UTC
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <***@intel.com>
---
.../Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
index 7027e96..a232b21 100644
--- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
+++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
@@ -492,11 +492,11 @@ UpdateDeviceSelectPage (
NewString = AllocateZeroPool (Len + StrSize (L"--"));
ASSERT (NewString != NULL);
if (EFI_ERROR (CheckMapping (ControllerDevicePath,NULL, &mMappingDataBase, NULL, NULL))) {
- StrCat (NewString, L"--");
+ StrCatS (NewString, (Len + StrSize (L"--"))/sizeof(CHAR16), L"--");
} else {
- StrCat (NewString, L"**");
+ StrCatS (NewString, (Len + StrSize (L"--"))/sizeof(CHAR16), L"**");
}
- StrCat (NewString, ControllerName);
+ StrCatS (NewString, (Len + StrSize (L"--"))/sizeof(CHAR16), ControllerName);
NewStringToken = HiiSetString (Private->RegisteredHandle, mControllerToken[Index], NewString, NULL);
ASSERT (NewStringToken != 0);
@@ -822,7 +822,7 @@ UpdateBindingDriverSelectPage (
mDriSelection[Index] = TRUE;
mLastSavedDriverImageNum++;
}
- StrCat (NewString, DriverName);
+ StrCatS (NewString, StrSize (DriverName)/sizeof(CHAR16), DriverName);
NewStringToken = HiiSetString (Private->RegisteredHandle, mDriverImageToken[Index], NewString, NULL);
ASSERT (NewStringToken != 0);
mDriverImageToken[Index] = NewStringToken;
@@ -838,7 +838,7 @@ UpdateBindingDriverSelectPage (
NewString = AllocateZeroPool (StrSize (DriverName));
ASSERT (NewString != NULL);
- StrCat (NewString, DriverName);
+ StrCatS (NewString, StrSize (DriverName)/sizeof(CHAR16), DriverName);
NewStringHelpToken = HiiSetString (Private->RegisteredHandle, DriverImageFilePathToken[Index], NewString, NULL);
ASSERT (NewStringHelpToken != 0);
DriverImageFilePathToken[Index] = NewStringHelpToken;
Signed-off-by: Qiu Shumin <***@intel.com>
---
.../Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
index 7027e96..a232b21 100644
--- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
+++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
@@ -492,11 +492,11 @@ UpdateDeviceSelectPage (
NewString = AllocateZeroPool (Len + StrSize (L"--"));
ASSERT (NewString != NULL);
if (EFI_ERROR (CheckMapping (ControllerDevicePath,NULL, &mMappingDataBase, NULL, NULL))) {
- StrCat (NewString, L"--");
+ StrCatS (NewString, (Len + StrSize (L"--"))/sizeof(CHAR16), L"--");
} else {
- StrCat (NewString, L"**");
+ StrCatS (NewString, (Len + StrSize (L"--"))/sizeof(CHAR16), L"**");
}
- StrCat (NewString, ControllerName);
+ StrCatS (NewString, (Len + StrSize (L"--"))/sizeof(CHAR16), ControllerName);
NewStringToken = HiiSetString (Private->RegisteredHandle, mControllerToken[Index], NewString, NULL);
ASSERT (NewStringToken != 0);
@@ -822,7 +822,7 @@ UpdateBindingDriverSelectPage (
mDriSelection[Index] = TRUE;
mLastSavedDriverImageNum++;
}
- StrCat (NewString, DriverName);
+ StrCatS (NewString, StrSize (DriverName)/sizeof(CHAR16), DriverName);
NewStringToken = HiiSetString (Private->RegisteredHandle, mDriverImageToken[Index], NewString, NULL);
ASSERT (NewStringToken != 0);
mDriverImageToken[Index] = NewStringToken;
@@ -838,7 +838,7 @@ UpdateBindingDriverSelectPage (
NewString = AllocateZeroPool (StrSize (DriverName));
ASSERT (NewString != NULL);
- StrCat (NewString, DriverName);
+ StrCatS (NewString, StrSize (DriverName)/sizeof(CHAR16), DriverName);
NewStringHelpToken = HiiSetString (Private->RegisteredHandle, DriverImageFilePathToken[Index], NewString, NULL);
ASSERT (NewStringHelpToken != 0);
DriverImageFilePathToken[Index] = NewStringHelpToken;
--
1.9.5.msysgit.1
1.9.5.msysgit.1