summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/pem/pem_lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/pem/pem_lib.c b/src/lib/libcrypto/pem/pem_lib.c
index bffd1fa954..6661a222f0 100644
--- a/src/lib/libcrypto/pem/pem_lib.c
+++ b/src/lib/libcrypto/pem/pem_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_lib.c,v 1.47 2018/05/13 10:47:54 tb Exp $ */ 1/* $OpenBSD: pem_lib.c,v 1.48 2018/08/24 19:48:39 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -613,7 +613,8 @@ PEM_write_bio(BIO *bp, const char *name, const char *header,
613 i = j = 0; 613 i = j = 0;
614 while (len > 0) { 614 while (len > 0) {
615 n = (int)((len > (PEM_BUFSIZE * 5)) ? (PEM_BUFSIZE * 5) : len); 615 n = (int)((len > (PEM_BUFSIZE * 5)) ? (PEM_BUFSIZE * 5) : len);
616 EVP_EncodeUpdate(&ctx, buf, &outl, &(data[j]), n); 616 if (!EVP_EncodeUpdate(&ctx, buf, &outl, &(data[j]), n))
617 goto err;
617 if ((outl) && (BIO_write(bp, (char *)buf, outl) != outl)) 618 if ((outl) && (BIO_write(bp, (char *)buf, outl) != outl))
618 goto err; 619 goto err;
619 i += outl; 620 i += outl;