X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fasn1%2Ftasn_dec.c;h=940e6af6b3cd7606822243cafdef98ed41ca1797;hp=0caa8f6bd347e67e765fbbe3427de321cd582a3b;hb=3c07b4c2ee35181d8a02c56183b177f1c0010e2f;hpb=1cc0b0a66a4197efb26c357a18f443608ed3d605 diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index 0caa8f6bd3..940e6af6b3 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -201,7 +201,7 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, unsigned char **in, long len, const ASN1 if(tag != -1) { p = *in; imphack = *p; - *p = (*p & V_ASN1_CONSTRUCTED) | it->utype; + *p = (unsigned char)((*p & V_ASN1_CONSTRUCTED) | it->utype); } ptmpval = cf->asn1_d2i(pval, in, len); @@ -315,7 +315,7 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, unsigned char **in, long len, const ASN1 * it increases efficiency in some cases. */ if(i == (it->tcount - 1)) isopt = 0; - else isopt = seqtt->flags & ASN1_TFLG_OPTIONAL; + else isopt = (char)(seqtt->flags & ASN1_TFLG_OPTIONAL); /* attempt to read in field, allowing each to be OPTIONAL */ ret = asn1_template_ex_d2i(pseqval, &p, len, seqtt, isopt, ctx); if(!ret) {