diff options
author | Dandan Bi <dandan.bi@intel.com> | 2015-06-29 02:36:31 +0000 |
---|---|---|
committer | dandanbi <dandanbi@Edk2> | 2015-06-29 02:36:31 +0000 |
commit | 5ad66ec6925f1564137752be4d8656d462ebeaf2 (patch) | |
tree | 62c65c37d412e3ab06e55fa209a2e4f013f9f576 /MdeModulePkg/Universal/HiiDatabaseDxe/Database.c | |
parent | e9da7deaa475fee947760d49e46c74bae90449ad (diff) | |
download | edk2-5ad66ec6925f1564137752be4d8656d462ebeaf2.zip edk2-5ad66ec6925f1564137752be4d8656d462ebeaf2.tar.gz edk2-5ad66ec6925f1564137752be4d8656d462ebeaf2.tar.bz2 |
MdeModulePkg:Use safe string functions
Replace unsafe String functions with new added safe string functions
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17724 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe/Database.c')
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/Database.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c index 70c0385..7ea2e72 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c @@ -1,7 +1,7 @@ /** @file
Implementation for EFI_HII_DATABASE_PROTOCOL.
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -798,7 +798,7 @@ InsertStringPackage ( if (Language == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- AsciiStrCpy (Language, (CHAR8 *) PackageHdr + HeaderSize - LanguageSize);
+ AsciiStrCpyS (Language, LanguageSize / sizeof (CHAR8), (CHAR8 *) PackageHdr + HeaderSize - LanguageSize);
for (Link = PackageList->StringPkgHdr.ForwardLink; Link != &PackageList->StringPkgHdr; Link = Link->ForwardLink) {
StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);
if (HiiCompareLanguage (Language, StringPackage->StringPkgHdr->Language)) {
@@ -1182,7 +1182,7 @@ InsertFontPackage ( }
FontInfo->FontStyle = FontPkgHdr->FontStyle;
FontInfo->FontSize = FontPkgHdr->Cell.Height;
- StrCpy (FontInfo->FontName, FontPkgHdr->FontFamily);
+ StrCpyS (FontInfo->FontName, sizeof (FontInfo->FontName) / sizeof (CHAR16), FontPkgHdr->FontFamily);
if (IsFontInfoExisted (Private, FontInfo, NULL, NULL, NULL)) {
Status = EFI_UNSUPPORTED;
|