diff options
Diffstat (limited to 'src/vendorcode/amd/agesa/f15')
-rw-r--r-- | src/vendorcode/amd/agesa/f15/Proc/CPU/cpuEventLog.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vendorcode/amd/agesa/f15/Proc/CPU/cpuEventLog.c b/src/vendorcode/amd/agesa/f15/Proc/CPU/cpuEventLog.c index 1810764431..06346576b7 100644 --- a/src/vendorcode/amd/agesa/f15/Proc/CPU/cpuEventLog.c +++ b/src/vendorcode/amd/agesa/f15/Proc/CPU/cpuEventLog.c @@ -122,6 +122,8 @@ AmdReadEventLog ( ASSERT (Event != NULL); Event->StdHeader.HeapBasePtr = HeapGetBaseAddress (&Event->StdHeader); Status = GetEventLog (&LogEvent, &Event->StdHeader); + if (Status != AGESA_SUCCESS) + return Status; Event->EventClass = LogEvent.EventClass; Event->EventInfo = LogEvent.EventInfo; @@ -220,6 +222,9 @@ PutEventLog ( AgesaEventAlloc = NULL; GetEventLogHeapPointer (&AgesaEventAlloc, StdHeader); ASSERT (AgesaEventAlloc != NULL); + if (AgesaEventAlloc == NULL) + return; + Index = AgesaEventAlloc->WriteRecordPtr; // Add the new event log data into a circular buffer @@ -282,6 +287,8 @@ GetEventLog ( GetEventLogHeapPointer (&AgesaEventAlloc, StdHeader); ASSERT (AgesaEventAlloc != NULL); + if (AgesaEventAlloc == NULL) + return AGESA_BOUNDS_CHK; if ((AgesaEventAlloc->ReadRecordPtr == AgesaEventAlloc->WriteRecordPtr) && (AgesaEventAlloc->ReadWriteFlag == 1)) { @@ -339,6 +346,8 @@ PeekEventLog ( GetEventLogHeapPointer (&AgesaEventAlloc, StdHeader); ASSERT (AgesaEventAlloc != NULL); + if (AgesaEventAlloc == NULL) + return FALSE; if ((AgesaEventAlloc->ReadRecordPtr == AgesaEventAlloc->WriteRecordPtr) && (AgesaEventAlloc->ReadWriteFlag == 1)) { |