Skip to content

Commit

Permalink
CryptoPkg/BaseCryptLib: Fix serial number read overrun
Browse files Browse the repository at this point in the history
Signed-off-by: Michael D Kinney <[email protected]>
  • Loading branch information
mdkinney authored and mergify[bot] committed Nov 8, 2024
1 parent 12e1b1f commit d5600f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ X509GetSerialNumber (
}

if (SerialNumber != NULL) {
CopyMem (SerialNumber, Asn1Integer->data, *SerialNumberSize);
CopyMem (SerialNumber, Asn1Integer->data, (UINTN)Asn1Integer->length);
Status = TRUE;
}

Expand Down

0 comments on commit d5600f4

Please sign in to comment.