Fix the issues,
authorxgu3 <xgu3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 16 Jan 2007 02:57:57 +0000 (02:57 +0000)
committerxgu3 <xgu3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 16 Jan 2007 02:57:57 +0000 (02:57 +0000)
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

EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c
EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h
EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BootMaint.c
EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/ConsoleOption.c
EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/Variable.c
EdkUnixPkg/Dxe/PlatformBds/Generic/BootMaint/ConsoleOption.c
EdkUnixPkg/Dxe/PlatformBds/Generic/BootMaint/Variable.c

index dc7ed07..143836b 100644 (file)
@@ -28,12 +28,14 @@ Abstract:
 #include <Crc32SectionExtract.h>\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 InitializeCrc32GuidedSectionExtractionProtocol (\r
   IN EFI_HANDLE                   ImageHandle,\r
   IN EFI_SYSTEM_TABLE             *SystemTable\r
   );\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 InitializeCrc32GuidedSectionExtractionProtocol (\r
   IN EFI_HANDLE                   ImageHandle,\r
   IN EFI_SYSTEM_TABLE             *SystemTable\r
@@ -98,6 +100,7 @@ Returns:
 \r
 STATIC\r
 UINT32\r
+EFIAPI\r
 GetSectionLength (\r
   IN EFI_COMMON_SECTION_HEADER  *CommonHeader\r
   )\r
@@ -126,6 +129,7 @@ GetSectionLength (
 \r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 Crc32ExtractSection (\r
   IN  EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL  *This,\r
   IN  VOID                                    *InputSection,\r
index 8e32d6d..de2bb3a 100644 (file)
@@ -34,6 +34,7 @@ typedef struct {
 //\r
 STATIC\r
 EFI_STATUS\r
+EFIAPI\r
 Crc32ExtractSection (\r
   IN  EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL  *This,\r
   IN  VOID                                    *InputSection,\r
index 6eefa0b..2f90e3c 100644 (file)
@@ -449,6 +449,7 @@ Returns:
       Index2                  = (UINT16) (KeyValue - HANDLE_OPTION_OFFSET);\r
 \r
       NewMenuEntry            = BOpt_GetMenuEntry (&DriverMenu, Index2);\r
+      ASSERT (NewMenuEntry != NULL);\r
       Private->HandleContext  = (BM_HANDLE_CONTEXT *) NewMenuEntry->VariableContext;\r
 \r
       CleanUpPage (FORM_DRV_ADD_HANDLE_DESC_ID, Private);\r
@@ -556,6 +557,8 @@ Returns:
   case FORM_CON_COM_ID:\r
     NewMenuEntry                      = BOpt_GetMenuEntry (&TerminalMenu, Private->CurrentTerminal);\r
 \r
+    ASSERT (NewMenuEntry != NULL);\r
+\r
     NewTerminalContext                = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;\r
 \r
     NewTerminalContext->BaudRateIndex = CurrentFakeNVMap->COMBaudRate;\r
index c77fa0a..7a62765 100644 (file)
@@ -175,6 +175,7 @@ ChangeVariableDevicePath (
                       &TerminalMenu,\r
                       Com\r
                       );\r
+      ASSERT (NewMenuEntry != NULL);\r
       NewTerminalContext  = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;\r
       Uart                = (UART_DEVICE_PATH *) Node;\r
       CopyMem (\r
index 88955c7..cac68a1 100644 (file)
@@ -450,6 +450,7 @@ Var_UpdateConsoleOption (
                             NewTerminalContext->DevicePath,\r
                             (EFI_DEVICE_PATH_PROTOCOL *) &Vendor\r
                             );\r
+      ASSERT (TerminalDevicePath != NULL);\r
       ChangeTerminalDevicePath (TerminalDevicePath, TRUE);\r
       Temp = DevicePathToStr (TerminalDevicePath);\r
       ConDevicePath = AppendDevicePathInstance (\r
index 297c2cf..9acacc8 100644 (file)
@@ -175,6 +175,7 @@ ChangeVariableDevicePath (
                       &TerminalMenu,\r
                       Com\r
                       );\r
+      ASSERT (NewMenuEntry != NULL);\r
       NewTerminalContext  = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;\r
       Uart                = (UART_DEVICE_PATH *) Node;\r
       CopyMem (\r
index c660e40..454d192 100644 (file)
@@ -450,6 +450,7 @@ Var_UpdateConsoleOption (
                             NewTerminalContext->DevicePath,\r
                             (EFI_DEVICE_PATH_PROTOCOL *) &Vendor\r
                             );\r
+      ASSERT (TerminalDevicePath != NULL);\r
       ChangeTerminalDevicePath (TerminalDevicePath, TRUE);\r
       Temp = DevicePathToStr (TerminalDevicePath);\r
       ConDevicePath = AppendDevicePathInstance (\r