From 723f616df81ea05f31407f7417f49eea89bb459a Mon Sep 17 00:00:00 2001 From: Jon Spillett Date: Wed, 1 Mar 2017 14:22:21 +1000 Subject: [PATCH] Exit the loop on failure Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2805) (cherry picked from commit f125430063dd81efe098c99542b02b2a918adc1d) --- crypto/asn1/bio_asn1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/asn1/bio_asn1.c b/crypto/asn1/bio_asn1.c index 400effa12c..7576c65dd1 100644 --- a/crypto/asn1/bio_asn1.c +++ b/crypto/asn1/bio_asn1.c @@ -209,7 +209,7 @@ static int asn1_bio_write(BIO *b, const char *in, int inl) wrmax = inl; ret = BIO_write(next, in, wrmax); if (ret <= 0) - break; + goto done; wrlen += ret; ctx->copylen -= ret; in += ret; -- 2.25.1