audk/MdeModulePkg/Universal/HiiDatabaseDxe
Mike Beaton 0bcc503595 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 <mjsbeaton@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2023-09-11 01:17:33 +00:00
..
ConfigKeywordHandler.c MdeModulePkg/HiiDatabase: Fix incorrect AllocateCopyPool size 2023-09-11 01:17:33 +00:00
ConfigRouting.c MdeModulePkg/HiiDatabase: Fix Setup numeric default value incorrect issue 2022-04-08 02:08:35 +00:00
Database.c MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Font.c MdeModulePkg: Fix conditionally uninitialized variables 2023-04-03 15:29:08 +00:00
HiiDatabase.h MdeModulePkg/HiiDatabase: Fix Setup numeric default value incorrect issue 2022-04-08 02:08:35 +00:00
HiiDatabase.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
HiiDatabaseDxe.inf MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
HiiDatabaseEntry.c MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HiiDatabaseExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Image.c MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ImageEx.c MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
String.c MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00