summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/UefiHiiLib
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-13 08:15:51 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-13 08:15:51 +0000
commit3e3f86e0b8ce62f6f41f0b81c4876bcc23cc49f9 (patch)
tree3861b1e5875a4d609cf9289b948b985ef3e98c1a /MdeModulePkg/Library/UefiHiiLib
parent81dac9306328dfc2c8b5f3a06dba3fb1076f5404 (diff)
downloadedk2-3e3f86e0b8ce62f6f41f0b81c4876bcc23cc49f9.zip
edk2-3e3f86e0b8ce62f6f41f0b81c4876bcc23cc49f9.tar.gz
edk2-3e3f86e0b8ce62f6f41f0b81c4876bcc23cc49f9.tar.bz2
Fix Bug to convert low Hex string to handle L'A' - L'F'
Fix Bug in HiiConstructConfigHdr API to support NULL DriverHandle. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8074 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/UefiHiiLib')
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/HiiLib.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
index 997e36a..384bab4 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
@@ -699,7 +699,7 @@ InternalHiiLowerConfigString (
Lower = TRUE;
} else if (*String == L'&') {
Lower = FALSE;
- } else if (Lower && *String > L'A' && *String <= L'F') {
+ } else if (Lower && *String >= L'A' && *String <= L'F') {
*String = (CHAR16) (*String - L'A' + L'a');
}
}
@@ -928,7 +928,6 @@ InternalHiiBrowserCallback (
to a 2 Unicode character hexidecimal string.
@retval NULL DriverHandle does not support the Device Path Protocol.
- @retval NULL DriverHandle does not support the Device Path Protocol.
@retval Other A pointer to the Null-terminate Unicode <ConfigHdr> string
**/
@@ -957,20 +956,23 @@ HiiConstructConfigHdr (
NameLength = StrLen (Name);
}
+ DevicePath = NULL;
+ DevicePathSize = 0;
//
// Retrieve DevicePath Protocol associated with DriverHandle
//
- DevicePath = DevicePathFromHandle (DriverHandle);
- if (DevicePath == NULL) {
- return NULL;
+ if (DriverHandle != NULL) {
+ DevicePath = DevicePathFromHandle (DriverHandle);
+ if (DevicePath == NULL) {
+ return NULL;
+ }
+ //
+ // Compute the size of the device path in bytes
+ //
+ DevicePathSize = GetDevicePathSize (DevicePath);
}
//
- // Compute the size of the device path in bytes
- //
- DevicePathSize = GetDevicePathSize (DevicePath);
-
- //
// GUID=<HexCh>32&NAME=<Char>NameLength&PATH=<HexChar>DevicePathSize <Null>
// | 5 | sizeof (EFI_GUID) * 2 | 6 | NameStrLen*4 | 6 | DevicePathSize * 2 | 1 |
//