Fix from HEAD.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 31 Jan 2006 18:37:41 +0000 (18:37 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 31 Jan 2006 18:37:41 +0000 (18:37 +0000)
crypto/asn1/tasn_dec.c

index 2b9c25611ecd6c4fbac1ed2ec62a4d6a796bfe09..eddaae6c9dc314f79f76d6bc245d644a0fd4cf6b 100644 (file)
@@ -1167,7 +1167,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;
                }