X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FHiiDatabaseDxe%2FDatabase.c;h=7ea2e723a50eda93b1e15c2eea612f2584e3c3b7;hb=5ad66ec6925f1564137752be4d8656d462ebeaf2;hp=70c0385d88990c7fc875ebbc025664480f12567c;hpb=e9da7deaa475fee947760d49e46c74bae90449ad;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c index 70c0385d88..7ea2e723a5 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.
+Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
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;