Ignore zero length constructed segments.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 31 Jan 2006 18:36:29 +0000 (18:36 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 31 Jan 2006 18:36:29 +0000 (18:36 +0000)
crypto/asn1/tasn_dec.c

index f369fcb9bb8c3c3973cce3667e4fbd57413aed02..ffec26f2f3269f95b858934151ef4ca4cc1a6920 100644 (file)
@@ -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;
                }