Skip to content

Commit ca4a17e

Browse files
Merge pull request #6339 from SparkiDev/asn_orig_ocsp_fix
ASN original, OCSP: fix maximum size calc to GetDateInfo
2 parents ccb9bdd + 5b0c017 commit ca4a17e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33786,7 +33786,7 @@ static int DecodeSingleResponse(byte* source, word32* ioIndex, word32 size,
3378633786
localIdx = 0;
3378733787
if (GetDateInfo(single->status->thisDateAsn, &localIdx, NULL,
3378833788
(byte*)&single->status->thisDateParsed.type,
33789-
&single->status->thisDateParsed.length, size) < 0)
33789+
&single->status->thisDateParsed.length, size - idx) < 0)
3379033790
return ASN_PARSE_E;
3379133791

3379233792
if (idx + localIdx >= size)
@@ -33822,7 +33822,7 @@ static int DecodeSingleResponse(byte* source, word32* ioIndex, word32 size,
3382233822
localIdx = 0;
3382333823
if (GetDateInfo(single->status->nextDateAsn, &localIdx, NULL,
3382433824
(byte*)&single->status->nextDateParsed.type,
33825-
&single->status->nextDateParsed.length, size) < 0)
33825+
&single->status->nextDateParsed.length, size - idx) < 0)
3382633826
return ASN_PARSE_E;
3382733827

3382833828
if (idx + localIdx >= size)

0 commit comments

Comments
 (0)