Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:506:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2574:1: enter_function: entry to ‘CoreInitializeGcdServices’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2642:29: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2646:8: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2646:8: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2649:15: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2713:10: branch_true: following ‘true’ branch (when ‘GcdIoType != 0’)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2714:18: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2714:18: call_function: calling ‘CoreAddIoSpace’ from ‘CoreInitializeGcdServices’ # 504| AdjacentEntry = CR (AdjacentLink, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE); # 505| # 506|-> if (Entry->Capabilities != AdjacentEntry->Capabilities) { # 507| return EFI_UNSUPPORTED; # 508| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:619:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2574:1: enter_function: entry to ‘CoreInitializeGcdServices’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2726:12: call_function: calling ‘CoreGetMemorySpaceDescriptor’ from ‘CoreInitializeGcdServices’ # 617| while (Link != Map) { # 618| Entry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE); # 619|-> if ((BaseAddress >= Entry->BaseAddress) && (BaseAddress <= Entry->EndAddress)) { # 620| *StartLink = Link; # 621| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:782:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2574:1: enter_function: entry to ‘CoreInitializeGcdServices’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2642:29: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2646:8: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2646:8: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2649:15: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2705:18: call_function: calling ‘CoreInternalAddMemorySpace’ from ‘CoreInitializeGcdServices’ # 780| // # 781| case GCD_ADD_MEMORY_OPERATION: # 782|-> if ((Entry->GcdMemoryType != EfiGcdMemoryTypeNonExistent) || # 783| (Entry->ImageHandle != NULL)) # 784| { Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:791:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2574:1: enter_function: entry to ‘CoreInitializeGcdServices’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2642:29: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2646:8: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2646:8: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2649:15: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2713:10: branch_true: following ‘true’ branch (when ‘GcdIoType != 0’)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2714:18: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2714:18: call_function: calling ‘CoreAddIoSpace’ from ‘CoreInitializeGcdServices’ # 789| break; # 790| case GCD_ADD_IO_OPERATION: # 791|-> if ((Entry->GcdIoType != EfiGcdIoTypeNonExistent) || # 792| (Entry->ImageHandle != NULL)) # 793| { Error: GCC_ANALYZER_WARNING (CWE-476): [#def5] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:1056:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2574:1: enter_function: entry to ‘CoreInitializeGcdServices’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2726:12: call_function: calling ‘CoreGetMemorySpaceDescriptor’ from ‘CoreInitializeGcdServices’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2726:12: return_function: returning to ‘CoreInitializeGcdServices’ from ‘CoreGetMemorySpaceDescriptor’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2747:29: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2748:8: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2776:8: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2778:27: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:2779:27: call_function: calling ‘CoreAllocateMemorySpace’ from ‘CoreInitializeGcdServices’ # 1054| ) # 1055| { # 1056|-> if (Entry->ImageHandle != NULL) { # 1057| return EFI_NOT_FOUND; # 1058| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def6] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:1596:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:1737:1: enter_function: entry to ‘CoreGetMemorySpaceMap’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:1777:14: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:1778:17: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:1779:9: call_function: calling ‘BuildMemoryDescriptor’ from ‘CoreGetMemorySpaceMap’ # 1594| ) # 1595| { # 1596|-> Descriptor->BaseAddress = Entry->BaseAddress; # 1597| Descriptor->Length = Entry->EndAddress - Entry->BaseAddress + 1; # 1598| Descriptor->Capabilities = Entry->Capabilities; Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:1976:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:190:1: enter_function: entry to ‘CoreDumpGcdIoSpaceMap’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Gcd/Gcd.c:200:12: call_function: calling ‘CoreGetIoSpaceMap’ from ‘CoreDumpGcdIoSpaceMap’ # 1974| ) # 1975| { # 1976|-> Descriptor->BaseAddress = Entry->BaseAddress; # 1977| Descriptor->Length = Entry->EndAddress - Entry->BaseAddress + 1; # 1978| Descriptor->GcdIoType = Entry->GcdIoType; Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1405:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘OpenData’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1347:1: enter_function: entry to ‘CoreCloseProtocol’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1368:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1372:12: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1373:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1377:6: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1384:6: branch_false: following ‘false’ branch (when ‘Protocol’ is non-NULL)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1393:23: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1393:23: call_function: calling ‘CoreGetProtocolInterface’ from ‘CoreCloseProtocol’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1393:23: return_function: returning to ‘CoreCloseProtocol’ from ‘CoreGetProtocolInterface’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1394:6: branch_false: following ‘false’ branch (when ‘ProtocolInterface’ is non-NULL)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1401:3: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1402:10: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1403:16: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1403:16: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1404:5: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1405:10: danger: dereference of NULL ‘OpenData’ # 1403| OpenData = CR (Link, OPEN_PROTOCOL_DATA, Link, OPEN_PROTOCOL_DATA_SIGNATURE); # 1404| Link = Link->ForwardLink; # 1405|-> if ((OpenData->AgentHandle == AgentHandle) && (OpenData->ControllerHandle == ControllerHandle)) { # 1406| RemoveEntryList (&OpenData->Link); # 1407| ProtocolInterface->OpenListCount--; Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1612:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Prot’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1565:6: branch_false: following ‘false’ branch (when ‘ProtocolBuffer’ is non-NULL)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1569:6: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1569:6: branch_false: following ‘false’ branch (when ‘ProtocolBufferCount’ is non-NULL)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1573:3: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1580:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1586:8: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1593:6: branch_false: following ‘false’ branch (when ‘ProtocolCount != 0’)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1598:26: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1599:6: branch_false: following ‘false’ branch (when ‘Buffer’ is non-NULL)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1604:3: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1608:9: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1611:29: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1611:29: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1612:31: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1612:31: danger: dereference of NULL ‘Prot’ # 1610| { # 1611| Prot = CR (Link, PROTOCOL_INTERFACE, Link, PROTOCOL_INTERFACE_SIGNATURE); # 1612|-> Buffer[ProtocolCount] = &(Prot->Protocol->ProtocolID); # 1613| } # 1614| Error: GCC_ANALYZER_WARNING (CWE-476): [#def10] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1662:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Handle’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1660:51: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1661:14: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1661:14: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1662:9: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1662:9: danger: dereference of NULL ‘Handle’ # 1660| for (Link = gHandleList.ForwardLink, Count = 0; Link != &gHandleList; Link = Link->ForwardLink) { # 1661| Handle = CR (Link, IHANDLE, AllHandles, EFI_HANDLE_SIGNATURE); # 1662|-> if (Handle->Key > Key) { # 1663| Count++; # 1664| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def11] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1675:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Handle’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1668:6: branch_false: following ‘false’ branch (when ‘HandleBuffer’ is non-NULL)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1673:8: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1673:51: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1674:14: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1674:14: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1675:9: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Handle.c:1675:9: danger: dereference of NULL ‘Handle’ # 1673| for (Link = gHandleList.ForwardLink, Count = 0; Link != &gHandleList; Link = Link->ForwardLink) { # 1674| Handle = CR (Link, IHANDLE, AllHandles, EFI_HANDLE_SIGNATURE); # 1675|-> if (Handle->Key > Key) { # 1676| HandleBuffer[Count++] = Handle; # 1677| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def12] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Notify.c:32:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ProtNotify’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Notify.c:30:46: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Notify.c:31:18: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Hand/Notify.c:32:5: danger: dereference of NULL ‘ProtNotify’ # 30| for (Link = ProtEntry->Notify.ForwardLink; Link != &ProtEntry->Notify; Link = Link->ForwardLink) { # 31| ProtNotify = CR (Link, PROTOCOL_NOTIFY, Link, PROTOCOL_NOTIFY_SIGNATURE); # 32|-> CoreSignalEvent (ProtNotify->Event); # 33| } # 34| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def13] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:767:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘DriverInfoData’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1671:1: enter_function: entry to ‘ProfileProtocolUnregisterImage’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1690:10: call_function: calling ‘UnregisterMemoryProfileImage’ from ‘ProfileProtocolUnregisterImage’ # 765| DriverInfo = &DriverInfoData->DriverInfo; # 766| if ((CompareGuid (&DriverInfo->FileName, FileName)) && # 767|-> (Address >= DriverInfo->ImageBase) && # 768| (Address < (DriverInfo->ImageBase + DriverInfo->ImageSize))) # 769| { Error: GCC_ANALYZER_WARNING (CWE-476): [#def14] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:811:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘DriverInfoData’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1173:1: enter_function: entry to ‘CoreUpdateProfileFree’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1196:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1200:20: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1200:20: call_function: calling ‘GetMemoryProfileDriverInfoFromAddress’ from ‘CoreUpdateProfileFree’ # 809| ); # 810| DriverInfo = &DriverInfoData->DriverInfo; # 811|-> if ((Address >= DriverInfo->ImageBase) && # 812| (Address < (DriverInfo->ImageBase + DriverInfo->ImageSize))) # 813| { Error: GCC_ANALYZER_WARNING (CWE-476): [#def15] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1118:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘DriverInfoData’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1357:1: enter_function: entry to ‘CoreUpdateProfile’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1370:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1374:7: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1374:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1378:7: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1378:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1385:3: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1400:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1404:3: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1410:16: call_function: calling ‘CoreUpdateProfileFree’ from ‘CoreUpdateProfile’ # 1116| MEMORY_PROFILE_ALLOC_INFO_DATA *AllocInfoData; # 1117| # 1118|-> AllocInfoList = DriverInfoData->AllocInfoList; # 1119| # 1120| for (AllocLink = AllocInfoList->ForwardLink; Error: GCC_ANALYZER_WARNING (CWE-476): [#def16] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1131:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘AllocInfoData’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1173:1: enter_function: entry to ‘CoreUpdateProfileFree’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1196:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1200:20: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1200:20: call_function: calling ‘GetMemoryProfileDriverInfoFromAddress’ from ‘CoreUpdateProfileFree’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1200:20: return_function: returning to ‘CoreUpdateProfileFree’ from ‘GetMemoryProfileDriverInfoFromAddress’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1214:8: branch_true: following ‘true’ branch (when ‘DriverInfoData’ is non-NULL)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1215:7: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1217:27: call_function: calling ‘GetMemoryProfileAllocInfoFromAddress’ from ‘CoreUpdateProfileFree’ # 1129| ); # 1130| AllocInfo = &AllocInfoData->AllocInfo; # 1131|-> if ((AllocInfo->Action & MEMORY_PROFILE_ACTION_BASIC_MASK) != BasicAction) { # 1132| continue; # 1133| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def17] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1471:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘DriverInfoData’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1452:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1458:3: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1460:8: branch_true: following ‘true’ branch (when ‘DriverLink != DriverInfoList’)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1463:22: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1463:22: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1469:18: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1471:5: danger: dereference of NULL ‘DriverInfoData’ # 1469| TotalSize += DriverInfoData->DriverInfo.Header.Length; # 1470| # 1471|-> AllocInfoList = DriverInfoData->AllocInfoList; # 1472| for (AllocLink = AllocInfoList->ForwardLink; # 1473| AllocLink != AllocInfoList; Error: GCC_ANALYZER_WARNING (CWE-476): [#def18] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1535:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘DriverInfoData’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1514:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1519:21: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1524:8: branch_true: following ‘true’ branch (when ‘DriverLink != DriverInfoList’)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1527:22: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1527:22: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1533:26: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1534:8: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1535:31: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1535:31: danger: dereference of NULL ‘DriverInfoData’ # 1533| CopyMem (DriverInfo, &DriverInfoData->DriverInfo, sizeof (MEMORY_PROFILE_DRIVER_INFO)); # 1534| if (DriverInfo->PdbStringOffset != 0) { # 1535|-> PdbSize = AsciiStrSize (DriverInfoData->PdbString); # 1536| CopyMem ((VOID *)((UINTN)DriverInfo + DriverInfo->PdbStringOffset), DriverInfoData->PdbString, PdbSize); # 1537| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def19] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1541:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘DriverInfoData’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1514:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1519:21: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1524:8: branch_true: following ‘true’ branch (when ‘DriverLink != DriverInfoList’)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1527:22: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1527:22: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1533:26: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1534:8: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1539:67: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1541:5: danger: dereference of NULL ‘DriverInfoData’ # 1539| AllocInfo = (MEMORY_PROFILE_ALLOC_INFO *)((UINTN)DriverInfo + DriverInfo->Header.Length); # 1540| # 1541|-> AllocInfoList = DriverInfoData->AllocInfoList; # 1542| for (AllocLink = AllocInfoList->ForwardLink; # 1543| AllocLink != AllocInfoList; Error: GCC_ANALYZER_WARNING (CWE-476): [#def20] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1554:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘AllocInfoData’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1514:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1519:21: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1524:8: branch_true: following ‘true’ branch (when ‘DriverLink != DriverInfoList’)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1527:22: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1543:10: branch_true: following ‘true’ branch (when ‘AllocLink != AllocInfoList’)... edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1546:23: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c:1554:42: danger: dereference of NULL ‘AllocInfoData’ # 1552| CopyMem (AllocInfo, &AllocInfoData->AllocInfo, sizeof (MEMORY_PROFILE_ALLOC_INFO)); # 1553| if (AllocInfo->ActionStringOffset != 0) { # 1554|-> ActionStringSize = AsciiStrSize (AllocInfoData->ActionString); # 1555| CopyMem ((VOID *)((UINTN)AllocInfo + AllocInfo->ActionStringOffset), AllocInfoData->ActionString, ActionStringSize); # 1556| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def21] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:218:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:474:1: enter_function: entry to ‘CoreLoadingFixedAddressHook’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:495:14: call_function: calling ‘CoreAllocatePages’ from ‘CoreLoadingFixedAddressHook’ # 216| Link = Link->ForwardLink; # 217| # 218|-> if (Entry->Type != Type) { # 219| continue; # 220| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def22] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:357:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:474:1: enter_function: entry to ‘CoreLoadingFixedAddressHook’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:495:14: call_function: calling ‘CoreAllocatePages’ from ‘CoreLoadingFixedAddressHook’ # 355| # 356| CopyMem (Entry, &mMapStack[mMapDepth], sizeof (MEMORY_MAP)); # 357|-> Entry->FromPages = TRUE; # 358| # 359| // Error: GCC_ANALYZER_WARNING (CWE-476): [#def23] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:364:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry2’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:474:1: enter_function: entry to ‘CoreLoadingFixedAddressHook’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:495:14: call_function: calling ‘CoreAllocatePages’ from ‘CoreLoadingFixedAddressHook’ # 362| for (Link2 = gMemoryMap.ForwardLink; Link2 != &gMemoryMap; Link2 = Link2->ForwardLink) { # 363| Entry2 = CR (Link2, MEMORY_MAP, Link, MEMORY_MAP_SIGNATURE); # 364|-> if (Entry2->FromPages && (Entry2->Start > Entry->Start)) { # 365| break; # 366| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def24] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:407:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:474:1: enter_function: entry to ‘CoreLoadingFixedAddressHook’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:495:14: call_function: calling ‘CoreAllocatePages’ from ‘CoreLoadingFixedAddressHook’ # 405| Entry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE); # 406| # 407|-> if ((Entry->GcdMemoryType == EfiGcdMemoryTypeReserved) && # 408| (Entry->EndAddress < MAX_ALLOC_ADDRESS) && # 409| ((Entry->Capabilities & (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED | EFI_MEMORY_TESTED)) == Error: GCC_ANALYZER_WARNING (CWE-476): [#def25] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:874:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:474:1: enter_function: entry to ‘CoreLoadingFixedAddressHook’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:495:14: call_function: calling ‘CoreAllocatePages’ from ‘CoreLoadingFixedAddressHook’ # 872| Entry = CR (Link, MEMORY_MAP, Link, MEMORY_MAP_SIGNATURE); # 873| # 874|-> if ((Entry->Start <= Start) && (Entry->End > Start)) { # 875| break; # 876| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def26] edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:1182:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Entry’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:474:1: enter_function: entry to ‘CoreLoadingFixedAddressHook’ edk2-fbe0805b2091/MdeModulePkg/Core/Dxe/Mem/Page.c:495:14: call_function: calling ‘CoreAllocatePages’ from ‘CoreLoadingFixedAddressHook’ # 1180| // If it's not a free entry, don't bother with it # 1181| // # 1182|-> if (Entry->Type != EfiConventionalMemory) { # 1183| continue; # 1184| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def27] edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:110:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Prot’ edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:100:6: branch_true: following ‘true’ branch (when ‘ProtNotify’ is non-NULL)... edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:101:5: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:108:8: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:109:20: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:109:20: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:110:7: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:110:7: danger: dereference of NULL ‘Prot’ # 108| if (Link != &ProtNotify->Protocol->Protocols) { # 109| Prot = CR (Link, PROTOCOL_INTERFACE, ByProtocol, PROTOCOL_INTERFACE_SIGNATURE); # 110|-> Handle = Prot->Handle; # 111| *Interface = Prot->Interface; # 112| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def28] edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:160:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Prot’ edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:151:8: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:159:18: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Locate.c:160:5: danger: dereference of NULL ‘Prot’ # 158| // # 159| Prot = CR (Link, PROTOCOL_INTERFACE, ByProtocol, PROTOCOL_INTERFACE_SIGNATURE); # 160|-> Handle = Prot->Handle; # 161| *Interface = Prot->Interface; # 162| Error: GCC_ANALYZER_WARNING (CWE-476): [#def29] edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Notify.c:65:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ProtNotify’ edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Notify.c:56:6: branch_true: following ‘true’ branch (when ‘Prot’ is non-NULL)... edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Notify.c:57:5: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Notify.c:62:48: branch_true: following ‘true’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Notify.c:63:20: branch_true: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Notify.c:63:20: branch_false: following ‘false’ branch... edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Notify.c:65:11: branch_false: ...to here edk2-fbe0805b2091/MdeModulePkg/Core/PiSmmCore/Notify.c:65:11: danger: dereference of NULL ‘ProtNotify’ # 63| ProtNotify = CR (Link, PROTOCOL_NOTIFY, Link, PROTOCOL_NOTIFY_SIGNATURE); # 64| # 65|-> if (ProtNotify->Position == &Prot->ByProtocol) { # 66| ProtNotify->Position = Prot->ByProtocol.BackLink; # 67| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def30] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:97:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:356:1: enter_function: entry to ‘HttpBootFormRouteConfig’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:386:18: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:388:3: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:398:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:409:5: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:405:3: call_function: calling ‘HttpBootAddBootOption’ from ‘HttpBootFormRouteConfig’ # 95| } # 96| # 97|-> TmpDevicePath = AppendDevicePathNode (Private->ParentDevicePath, (EFI_DEVICE_PATH_PROTOCOL *)Node); # 98| FreePool (Node); # 99| if (TmpDevicePath == NULL) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def31] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:273:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘CallbackInfo’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:258:18: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:263:12: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:273:24: danger: dereference of NULL ‘CallbackInfo’ # 271| // followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a Null-terminator # 272| // # 273|-> ConfigRequestHdr = HiiConstructConfigHdr (&gHttpBootConfigGuid, mHttpBootConfigStorageName, CallbackInfo->ChildHandle); # 274| Size = (StrLen (ConfigRequestHdr) + 32 + 1) * sizeof (CHAR16); # 275| ConfigRequest = AllocateZeroPool (Size); Error: GCC_ANALYZER_WARNING (CWE-476): [#def32] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:386:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘CallbackInfo’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:385:18: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:386:18: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:386:18: branch_true: following ‘true’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:386:18: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:386:18: danger: dereference of NULL ‘CallbackInfo’ # 384| # 385| CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This); # 386|-> Private = HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO (CallbackInfo); # 387| # 388| BufferSize = sizeof (HTTP_BOOT_CONFIG_IFR_NVDATA); Error: GCC_ANALYZER_WARNING (CWE-476): [#def33] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:478:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘CallbackInfo’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:463:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:467:18: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:467:18: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:469:6: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:469:6: branch_false: following ‘false’ branch (when ‘Action == 0’)... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:473:3: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:473:3: branch_true: following ‘true’ branch (when ‘QuestionId == 257’)... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:474:5: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootConfig.c:478:13: danger: dereference of NULL ‘CallbackInfo’ # 476| // Get user input URI string # 477| // # 478|-> Uri = HiiGetString (CallbackInfo->RegisteredHandle, Value->string, NULL); # 479| if (Uri == NULL) { # 480| return EFI_INVALID_PARAMETER; Error: GCC_ANALYZER_WARNING (CWE-476): [#def34] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:63:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:874:1: enter_function: entry to ‘HttpBootIp6DxeDriverBindingStart’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:899:6: branch_true: following ‘true’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:900:15: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:900:15: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:971:12: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:971:12: call_function: calling ‘HttpBootCheckIpv6Support’ from ‘HttpBootIp6DxeDriverBindingStart’ # 61| // Check whether the UNDI supports IPv6 by NII protocol. # 62| // # 63|-> if (Private->Nii != NULL) { # 64| *Ipv6Support = Private->Nii->Ipv6Supported; # 65| return EFI_SUCCESS; Error: GCC_ANALYZER_WARNING (CWE-476): [#def35] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:140:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:657:1: enter_function: entry to ‘HttpBootIp4DxeDriverBindingStop’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:681:6: branch_true: following ‘true’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:685:17: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:686:8: branch_false: following ‘false’ branch (when ‘NicHandle’ is non-NULL)... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:693:17: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:701:8: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:705:15: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:705:15: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:714:12: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:715:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:722:3: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:722:3: call_function: calling ‘HttpBootDestroyIp4Children’ from ‘HttpBootIp4DxeDriverBindingStop’ # 138| ASSERT (Private != NULL); # 139| # 140|-> if (Private->Dhcp4Child != NULL) { # 141| gBS->CloseProtocol ( # 142| Private->Dhcp4Child, Error: GCC_ANALYZER_WARNING (CWE-476): [#def36] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:198:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1189:1: enter_function: entry to ‘HttpBootIp6DxeDriverBindingStop’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1213:6: branch_true: following ‘true’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1217:17: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1218:8: branch_false: following ‘false’ branch (when ‘NicHandle’ is non-NULL)... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1225:17: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1233:8: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1237:15: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1237:15: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1246:12: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1247:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1254:3: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1254:3: call_function: calling ‘HttpBootDestroyIp6Children’ from ‘HttpBootIp6DxeDriverBindingStop’ # 196| ASSERT (Private != NULL); # 197| # 198|-> if (Private->Ip6Child != NULL) { # 199| gBS->CloseProtocol ( # 200| Private->Ip6Child, Error: GCC_ANALYZER_WARNING (CWE-476): [#def37] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:477:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:408:6: branch_true: following ‘true’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:409:15: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:409:15: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:477:7: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:477:7: danger: dereference of NULL ‘Private’ # 475| } # 476| # 477|-> if (Private->Ip4Nic != NULL) { # 478| // # 479| // Already created before Error: GCC_ANALYZER_WARNING (CWE-476): [#def38] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:708:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:681:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:707:17: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:707:17: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:708:5: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:708:5: danger: dereference of NULL ‘Private’ # 706| } else { # 707| Private = HTTP_BOOT_PRIVATE_DATA_FROM_LOADFILE (LoadFile); # 708|-> NicHandle = Private->Controller; # 709| } # 710| Error: GCC_ANALYZER_WARNING (CWE-476): [#def39] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1240:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1213:6: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1239:17: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1239:17: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1240:5: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootDxe.c:1240:5: danger: dereference of NULL ‘Private’ # 1238| } else { # 1239| Private = HTTP_BOOT_PRIVATE_DATA_FROM_LOADFILE (LoadFile); # 1240|-> NicHandle = Private->Controller; # 1241| } # 1242| Error: GCC_ANALYZER_WARNING (CWE-476): [#def40] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:693:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘VirtualNic’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:692:16: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:693:3: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:693:3: danger: dereference of NULL ‘VirtualNic’ # 691| # 692| VirtualNic = HTTP_BOOT_VIRTUAL_NIC_FROM_LOADFILE (This); # 693|-> Private = VirtualNic->Private; # 694| # 695| // Error: GCC_ANALYZER_WARNING (CWE-476): [#def41] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:812:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:799:13: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:801:3: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:808:10: branch_true: following ‘true’ branch (when ‘Data’ is non-NULL)... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:810:14: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:810:12: branch_true: following ‘true’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:811:14: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:810:13: branch_true: following ‘true’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:812:14: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:812:14: danger: dereference of NULL ‘Private’ # 810| if ((HttpMessage->Data.Request->Method == HttpMethodGet) && # 811| (HttpMessage->Data.Request->Url != NULL) && # 812|-> (Private->PartialTransferredSize == 0)) # 813| { # 814| Print (L"\n URI: %s\n", HttpMessage->Data.Request->Url); Error: GCC_ANALYZER_WARNING (CWE-476): [#def42] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:860:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:799:13: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:801:3: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:821:10: branch_true: following ‘true’ branch (when ‘Data’ is non-NULL)... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:824:13: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:850:12: branch_false: following ‘false’ branch (when ‘HttpHeader’ is NULL)... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:854:22: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:859:12: branch_true: following ‘true’ branch (when ‘HttpHeader’ is non-NULL)... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:860:59: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:860:11: danger: dereference of NULL ‘Private’ # 858| ); # 859| if (HttpHeader != NULL) { # 860|-> Private->FileSize = AsciiStrDecimalToUintn (HttpHeader->FieldValue); # 861| Private->ReceivedSize = 0; # 862| Private->Percentage = 0; Error: GCC_ANALYZER_WARNING (CWE-476): [#def43] edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:870:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:799:13: branch_false: following ‘false’ branch... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:801:3: branch_false: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:869:10: branch_true: following ‘true’ branch (when ‘DataLength != 0’)... edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:870:13: branch_true: ...to here edk2-fbe0805b2091/NetworkPkg/HttpBootDxe/HttpBootImpl.c:870:13: danger: dereference of NULL ‘Private’ # 868| case HttpBootHttpEntityBody: # 869| if (DataLength != 0) { # 870|-> if (Private->FileSize != 0) { # 871| // # 872| // We already know the file size, print in percentage format. Error: GCC_ANALYZER_WARNING (CWE-476): [#def44] edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:561:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Private’ edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:548:13: branch_false: following ‘false’ branch... edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:550:6: branch_false: ...to here edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:550:6: branch_true: following ‘true’ branch (when ‘Action == 3’)... edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:554:8: branch_true: ...to here edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:554:8: branch_true: following ‘true’ branch (when ‘QuestionId == 8192’)... edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:555:16: branch_true: ...to here edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:557:10: branch_true: following ‘true’ branch... edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:561:9: branch_true: ...to here edk2-fbe0805b2091/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c:561:9: danger: dereference of NULL ‘Private’ # 559| // Fail to get TPM2 HID # 560| // # 561|-> HiiSetString (Private->HiiHandle, STRING_TOKEN (STR_TPM2_ACPI_HID_CONTENT), L"Unknown", NULL); # 562| } else { # 563| AsciiStrToUnicodeStrS (HidStr, UnHidStr, 16);
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.86.0 |
diffbase-analyzer-version-cppcheck | 2.17.1 |
diffbase-analyzer-version-gcc | 15.0.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-212.us-west-2.compute.internal |
diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
diffbase-mock-config | fedora-rawhide-x86_64 |
diffbase-project-name | edk2-20250221-8.fc43 |
diffbase-store-results-to | /tmp/tmpwnlnrrod/edk2-20250221-8.fc43.tar.xz |
diffbase-time-created | 2025-04-25 13:13:23 |
diffbase-time-finished | 2025-04-25 13:59:49 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpwnlnrrod/edk2-20250221-8.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpwnlnrrod/edk2-20250221-8.fc43.src.rpm' |
diffbase-tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-212.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | edk2-20250221-8.fc42 |
store-results-to | /tmp/tmprjqt97iy/edk2-20250221-8.fc42.tar.xz |
time-created | 2025-04-25 12:23:41 |
time-finished | 2025-04-25 13:10:22 |
title | Fixed findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmprjqt97iy/edk2-20250221-8.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmprjqt97iy/edk2-20250221-8.fc42.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |