diff options
author | Ronald Cron <ronald.cron@arm.com> | 2014-09-01 13:19:43 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-09-01 13:19:43 +0000 |
commit | 947a10b1552cd512c16d562384253a6f52aa5178 (patch) | |
tree | f0b254270d28d85924513082b2e060df8a0a1424 /ArmPlatformPkg | |
parent | 4477336d058015b2e05e890aad2d79bac636789c (diff) | |
download | edk2-platforms-947a10b1552cd512c16d562384253a6f52aa5178.tar.xz |
ArmPlatformPkg/Bds: Corrected a bug in IsPrintableString()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16010 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r-- | ArmPlatformPkg/Bds/BdsHelper.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c index 27180d9783..b3003e99b4 100644 --- a/ArmPlatformPkg/Bds/BdsHelper.c +++ b/ArmPlatformPkg/Bds/BdsHelper.c @@ -404,7 +404,9 @@ IsUnicodeString ( * Some limitations:
* - it only supports unicode string that use ASCII character (< 0x100)
* - single character ASCII strings are interpreted as Unicode string
- * - string cannot be longer than 2 x BOOT_DEVICE_OPTION_MAX (600 bytes)
+ * - string cannot be longer than BOOT_DEVICE_OPTION_MAX characters and
+ * thus (BOOT_DEVICE_OPTION_MAX*2) bytes for an Unicode string and
+ * BOOT_DEVICE_OPTION_MAX bytes for an ASCII string.
*
* @param String Buffer that might contain a Unicode or Ascii string
* @param IsUnicode If not NULL this boolean value returns if the string is an
@@ -446,7 +448,7 @@ IsPrintableString ( }
IsPrintable = FALSE;
- for (Index = 0; Index < BOOT_DEVICE_OPTION_MAX * 2; Index++) {
+ for (Index = 0; Index < BOOT_DEVICE_OPTION_MAX; Index++) {
if (UnicodeDetected) {
Character = ((CHAR16*)String)[Index];
} else {
|