From: Jon Spillett Date: Wed, 1 Mar 2017 04:22:21 +0000 (+1000) Subject: Exit the loop on failure X-Git-Tag: OpenSSL_1_1_1-pre1~2084 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=f125430063dd81efe098c99542b02b2a918adc1d Exit the loop on failure Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2805) --- diff --git a/crypto/asn1/bio_asn1.c b/crypto/asn1/bio_asn1.c index 3d3f8e4c1e..31fd7258a9 100644 --- a/crypto/asn1/bio_asn1.c +++ b/crypto/asn1/bio_asn1.c @@ -212,7 +212,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;