mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Check for NULL ASN1_ITEM when initializeing
boolean option in ASN1_TYPE.
This commit is contained in:
parent
5e3247d8bc
commit
38c7271a39
@ -207,7 +207,10 @@ void ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it)
|
||||
break;
|
||||
|
||||
case V_ASN1_BOOLEAN:
|
||||
*(ASN1_BOOLEAN *)pval = it->size;
|
||||
if (it)
|
||||
*(ASN1_BOOLEAN *)pval = it->size;
|
||||
else
|
||||
*(ASN1_BOOLEAN *)pval = -1;
|
||||
return;
|
||||
|
||||
case V_ASN1_NULL:
|
||||
|
@ -307,7 +307,10 @@ int ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it)
|
||||
return 1;
|
||||
|
||||
case V_ASN1_BOOLEAN:
|
||||
*(ASN1_BOOLEAN *)pval = it->size;
|
||||
if (it)
|
||||
*(ASN1_BOOLEAN *)pval = it->size;
|
||||
else
|
||||
*(ASN1_BOOLEAN *)pval = -1;
|
||||
return 1;
|
||||
|
||||
case V_ASN1_NULL:
|
||||
|
Loading…
Reference in New Issue
Block a user