Fix the issues,

1. NULL Pointer Errors in Variable.c
2. consoleoption Null Ptr Error
3. bootmaint Null Ptr Error
4. EFIAPI missing Crc32SectionExtraction.c  


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2252 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xgu3 2007-01-16 02:57:57 +00:00
parent ad2baeff22
commit 2bbf72b0ab
7 changed files with 12 additions and 0 deletions

View File

@ -28,12 +28,14 @@ Abstract:
#include <Crc32SectionExtract.h> #include <Crc32SectionExtract.h>
EFI_STATUS EFI_STATUS
EFIAPI
InitializeCrc32GuidedSectionExtractionProtocol ( InitializeCrc32GuidedSectionExtractionProtocol (
IN EFI_HANDLE ImageHandle, IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable IN EFI_SYSTEM_TABLE *SystemTable
); );
EFI_STATUS EFI_STATUS
EFIAPI
InitializeCrc32GuidedSectionExtractionProtocol ( InitializeCrc32GuidedSectionExtractionProtocol (
IN EFI_HANDLE ImageHandle, IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable IN EFI_SYSTEM_TABLE *SystemTable
@ -98,6 +100,7 @@ Returns:
STATIC STATIC
UINT32 UINT32
EFIAPI
GetSectionLength ( GetSectionLength (
IN EFI_COMMON_SECTION_HEADER *CommonHeader IN EFI_COMMON_SECTION_HEADER *CommonHeader
) )
@ -126,6 +129,7 @@ GetSectionLength (
STATIC STATIC
EFI_STATUS EFI_STATUS
EFIAPI
Crc32ExtractSection ( Crc32ExtractSection (
IN EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This, IN EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,
IN VOID *InputSection, IN VOID *InputSection,

View File

@ -34,6 +34,7 @@ typedef struct {
// //
STATIC STATIC
EFI_STATUS EFI_STATUS
EFIAPI
Crc32ExtractSection ( Crc32ExtractSection (
IN EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This, IN EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,
IN VOID *InputSection, IN VOID *InputSection,

View File

@ -449,6 +449,7 @@ Returns:
Index2 = (UINT16) (KeyValue - HANDLE_OPTION_OFFSET); Index2 = (UINT16) (KeyValue - HANDLE_OPTION_OFFSET);
NewMenuEntry = BOpt_GetMenuEntry (&DriverMenu, Index2); NewMenuEntry = BOpt_GetMenuEntry (&DriverMenu, Index2);
ASSERT (NewMenuEntry != NULL);
Private->HandleContext = (BM_HANDLE_CONTEXT *) NewMenuEntry->VariableContext; Private->HandleContext = (BM_HANDLE_CONTEXT *) NewMenuEntry->VariableContext;
CleanUpPage (FORM_DRV_ADD_HANDLE_DESC_ID, Private); CleanUpPage (FORM_DRV_ADD_HANDLE_DESC_ID, Private);
@ -556,6 +557,8 @@ Returns:
case FORM_CON_COM_ID: case FORM_CON_COM_ID:
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Private->CurrentTerminal); NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Private->CurrentTerminal);
ASSERT (NewMenuEntry != NULL);
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext; NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
NewTerminalContext->BaudRateIndex = CurrentFakeNVMap->COMBaudRate; NewTerminalContext->BaudRateIndex = CurrentFakeNVMap->COMBaudRate;

View File

@ -175,6 +175,7 @@ ChangeVariableDevicePath (
&TerminalMenu, &TerminalMenu,
Com Com
); );
ASSERT (NewMenuEntry != NULL);
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext; NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
Uart = (UART_DEVICE_PATH *) Node; Uart = (UART_DEVICE_PATH *) Node;
CopyMem ( CopyMem (

View File

@ -450,6 +450,7 @@ Var_UpdateConsoleOption (
NewTerminalContext->DevicePath, NewTerminalContext->DevicePath,
(EFI_DEVICE_PATH_PROTOCOL *) &Vendor (EFI_DEVICE_PATH_PROTOCOL *) &Vendor
); );
ASSERT (TerminalDevicePath != NULL);
ChangeTerminalDevicePath (TerminalDevicePath, TRUE); ChangeTerminalDevicePath (TerminalDevicePath, TRUE);
Temp = DevicePathToStr (TerminalDevicePath); Temp = DevicePathToStr (TerminalDevicePath);
ConDevicePath = AppendDevicePathInstance ( ConDevicePath = AppendDevicePathInstance (

View File

@ -175,6 +175,7 @@ ChangeVariableDevicePath (
&TerminalMenu, &TerminalMenu,
Com Com
); );
ASSERT (NewMenuEntry != NULL);
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext; NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
Uart = (UART_DEVICE_PATH *) Node; Uart = (UART_DEVICE_PATH *) Node;
CopyMem ( CopyMem (

View File

@ -450,6 +450,7 @@ Var_UpdateConsoleOption (
NewTerminalContext->DevicePath, NewTerminalContext->DevicePath,
(EFI_DEVICE_PATH_PROTOCOL *) &Vendor (EFI_DEVICE_PATH_PROTOCOL *) &Vendor
); );
ASSERT (TerminalDevicePath != NULL);
ChangeTerminalDevicePath (TerminalDevicePath, TRUE); ChangeTerminalDevicePath (TerminalDevicePath, TRUE);
Temp = DevicePathToStr (TerminalDevicePath); Temp = DevicePathToStr (TerminalDevicePath);
ConDevicePath = AppendDevicePathInstance ( ConDevicePath = AppendDevicePathInstance (