diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_dec.c')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index 0fc1f421e2..f87c08793a 100644 --- a/src/lib/libcrypto/asn1/tasn_dec.c +++ b/src/lib/libcrypto/asn1/tasn_dec.c | |||
@@ -913,10 +913,10 @@ static int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass, char *i | |||
913 | ctx->ptag = ptag; | 913 | ctx->ptag = ptag; |
914 | ctx->hdrlen = p - q; | 914 | ctx->hdrlen = p - q; |
915 | ctx->valid = 1; | 915 | ctx->valid = 1; |
916 | /* If definite length, length + header can't exceed total | 916 | /* If definite length, and no error, length + |
917 | * amount of data available. | 917 | * header can't exceed total amount of data available. |
918 | */ | 918 | */ |
919 | if(!(i & 1) && ((plen + ctx->hdrlen) > len)) { | 919 | if(!(i & 0x81) && ((plen + ctx->hdrlen) > len)) { |
920 | ASN1err(ASN1_F_ASN1_CHECK_TLEN, ASN1_R_TOO_LONG); | 920 | ASN1err(ASN1_F_ASN1_CHECK_TLEN, ASN1_R_TOO_LONG); |
921 | asn1_tlc_clear(ctx); | 921 | asn1_tlc_clear(ctx); |
922 | return 0; | 922 | return 0; |