From: Bernd Edlinger Date: Sun, 9 Jul 2017 19:24:18 +0000 (+0200) Subject: Fix error handling in get_header_and_data. X-Git-Tag: OpenSSL_1_1_1-pre1~1068 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=aa8dfbc421c1bcb5ba508802629c8005340f3a9e;p=oweals%2Fopenssl.git Fix error handling in get_header_and_data. Reviewed-by: Tim Hudson Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/3896) --- diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index aacdad9e63..2a52aca3b7 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -859,7 +859,8 @@ static int get_header_and_data(BIO *bp, BIO **header, BIO **data, char *name, * Else, a line of text -- could be header or data; we don't * know yet. Just pass it through. */ - BIO_puts(tmp, linebuf); + if (BIO_puts(tmp, linebuf) < 0) + goto err; /* * Only encrypted files need the line length check applied. */