Branch: refs/heads/9m11_23
Home: https://github.com/tianocore/edk2
Commit: 3e38573dd4a3371fe621dc821cb998f8e6de82ac
https://github.com/tianocore/edk2/commit/3e38573dd4a3371fe621dc821cb998f8e6de82ac
Author: Mike Beaton <[email protected]>
Date: 2023-09-11 (Mon, 11 Sep 2023)
Changed paths:
M MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
Log Message:
-----------
MdeModulePkg/HiiDatabase: Fix incorrect AllocateCopyPool size
The immediately preceding call, GetBestLanguage, plus the implementation of
HiiGetString, which is called immediately afterwards, make it clear that
BestLanguage is a null-terminated ASCII string, and not just a five byte,
non-null terminated buffer.
Therefore AsciiStrLen is one byte too short, meaning that whether the space
allocated is really sufficient and whether the resultant string is really
null-terminated becomes implementation-dependent. Rather than switching to
AsciiStrSize, we use an explicitly compile-time string length calculation
(both compile-time and run-time approaches are currently used elsewhere in
the codebase for copying static strings).
Signed-off-by: Mike Beaton <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Reviewed-by: Dandan Bi <[email protected]>
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits