mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-02-04 00:45:05 +01:00
Error from GetShortInt with negative INTEGER values - Add WORD8 case
This commit is contained in:
@@ -1283,6 +1283,13 @@ static int GetASN_StoreData(const ASNItem* asn, ASNGetData* data,
|
||||
#endif
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
if ((asn->tag != ASN_BOOLEAN) && (!zeroPadded) &&
|
||||
(input[idx] >= 0x80U)) {
|
||||
#ifdef WOLFSSL_DEBUG_ASN_TEMPLATE
|
||||
WOLFSSL_MSG_VSNPRINTF("Unexpected negative INTEGER value");
|
||||
#endif
|
||||
return ASN_EXPECT_0_E;
|
||||
}
|
||||
/* Fill number with all of data. */
|
||||
*data->data.u8 = input[idx];
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user