summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorJon Spillett <jon.spillett@oracle.com>2017-03-01 14:22:21 +1000
committerRich Salz <rsalz@openssl.org>2017-03-09 09:33:38 -0500
commit723f616df81ea05f31407f7417f49eea89bb459a (patch)
tree4e241f1fb80881621e5ded93c05208f5680657cd /crypto/asn1
parentb97324dbcb12e8b509d513ded9ba3f71c14547d8 (diff)
Exit the loop on failure
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2805) (cherry picked from commit f125430063dd81efe098c99542b02b2a918adc1d)
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/bio_asn1.c2
1 files changed, 1 insertions, 1 deletions
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;