diff options
author | Michael D Kinney <michael.d.kinney@intel.com> | 2024-10-23 18:44:05 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-11-08 16:28:50 +0000 |
commit | d5600f4f5a9116c2fc0dd0daf3304477603dbf3f (patch) | |
tree | f0dc447c3803ba57d491c29cd5db099ecf60ebab /CryptoPkg | |
parent | 12e1b1f8ef6ec14ff518518c9f5794e127308aa2 (diff) | |
download | edk2-d5600f4f5a9116c2fc0dd0daf3304477603dbf3f.tar.gz edk2-d5600f4f5a9116c2fc0dd0daf3304477603dbf3f.tar.bz2 edk2-d5600f4f5a9116c2fc0dd0daf3304477603dbf3f.zip |
CryptoPkg/BaseCryptLib: Fix serial number read overrun
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c index 628e71439e..0239fee4e1 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c @@ -1056,7 +1056,7 @@ X509GetSerialNumber ( }
if (SerialNumber != NULL) {
- CopyMem (SerialNumber, Asn1Integer->data, *SerialNumberSize);
+ CopyMem (SerialNumber, Asn1Integer->data, (UINTN)Asn1Integer->length);
Status = TRUE;
}
|