aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/tasn_dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/tasn_dec.c')
-rw-r--r--crypto/asn1/tasn_dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c
index f369fcb9bb..ffec26f2f3 100644
--- a/crypto/asn1/tasn_dec.c
+++ b/crypto/asn1/tasn_dec.c
@@ -1169,7 +1169,7 @@ static int asn1_collect(BUF_MEM *buf, const unsigned char **in, long len,
return 0;
#endif
}
- else if (!collect_data(buf, &p, plen))
+ else if (plen && !collect_data(buf, &p, plen))
return 0;
len -= p - q;
}