diff options
author | jyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-14 06:28:40 +0000 |
---|---|---|
committer | jyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-14 06:28:40 +0000 |
commit | 960729473e14c847526af94c430bc38f93105ec7 (patch) | |
tree | 7f2673d72b7bf6bf090a6bbe294ccc81cb87bd1b /MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c | |
parent | 4efa9e594a7726769907628ce0ca7a320d7f159b (diff) | |
download | edk2-platforms-960729473e14c847526af94c430bc38f93105ec7.tar.xz |
Follow PI1.2c spec, check empty string and return EFI_INVALID_PARAMETER.
Clean up comment according to PI1.2c spec.
signed-off-by: jyao1
reviewed-by: rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12690 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c')
-rw-r--r-- | MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c index 8769509f76..aa20d6d302 100644 --- a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c +++ b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c @@ -1,7 +1,7 @@ /** @file
Save the S3 data to S3 boot script.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -1754,9 +1754,15 @@ S3BootScriptLabel ( EFI_BOOT_SCRIPT_TABLE_HEADER TableHeader;
UINT32 LabelLength;
//
- // Assume Label is not NULL
+ // Check NULL Label
//
- if (Label == NULL) {
+ if (Label == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+ //
+ // Check empty Label
+ //
+ if (Label[0] == '\0') {
return EFI_INVALID_PARAMETER;
}
|