mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Several ASN decoder fixes
See ZD 12349
This commit is contained in:
@ -17211,12 +17211,16 @@ static int DecodeSingleResponse(byte* source, word32* ioIndex, word32 size,
|
|||||||
ret = GetOctetString(source, &idx, &length, size);
|
ret = GetOctetString(source, &idx, &length, size);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
if (length > (int)sizeof(single->issuerHash))
|
||||||
|
return BUFFER_E;
|
||||||
XMEMCPY(single->issuerHash, source + idx, length);
|
XMEMCPY(single->issuerHash, source + idx, length);
|
||||||
idx += length;
|
idx += length;
|
||||||
/* Save reference to the hash of the issuer public key */
|
/* Save reference to the hash of the issuer public key */
|
||||||
ret = GetOctetString(source, &idx, &length, size);
|
ret = GetOctetString(source, &idx, &length, size);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
if (length > (int)sizeof(single->issuerKeyHash))
|
||||||
|
return BUFFER_E;
|
||||||
XMEMCPY(single->issuerKeyHash, source + idx, length);
|
XMEMCPY(single->issuerKeyHash, source + idx, length);
|
||||||
idx += length;
|
idx += length;
|
||||||
|
|
||||||
@ -17468,8 +17472,10 @@ static int DecodeResponseData(byte* source,
|
|||||||
if (single->next == NULL) {
|
if (single->next == NULL) {
|
||||||
return MEMORY_E;
|
return MEMORY_E;
|
||||||
}
|
}
|
||||||
|
CertStatus* status = single->status;
|
||||||
single = single->next;
|
single = single->next;
|
||||||
XMEMSET(single, 0, sizeof(OcspEntry));
|
XMEMSET(single, 0, sizeof(OcspEntry));
|
||||||
|
single->status = status;
|
||||||
single->isDynamic = 1;
|
single->isDynamic = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user