Skip to content

Commit

Permalink
AdvLoggerPkg: Return from write attempt if there is a mismatch
Browse files Browse the repository at this point in the history
of signature or version of the AdvancedLoggerPpi.
  • Loading branch information
VivianNK committed Aug 28, 2024
1 parent b5632fc commit 99c8690
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ AdvancedLoggerWrite (
ASSERT (AdvancedLoggerPpi->Signature == ADVANCED_LOGGER_PPI_SIGNATURE);
ASSERT (AdvancedLoggerPpi->Version == ADVANCED_LOGGER_PPI_VERSION);

if ((AdvancedLoggerPpi->Signature != ADVANCED_LOGGER_PPI_SIGNATURE) ||
(AdvancedLoggerPpi->Version != ADVANCED_LOGGER_PPI_VERSION))
{
// Signature/Version mismatch, don't attempt to use the PPI.
return;
}

AdvancedLoggerPpi->AdvancedLoggerWritePpi (ErrorLevel, Buffer, NumberOfBytes);
}
}

0 comments on commit 99c8690

Please sign in to comment.