diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-07-09 21:24:18 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-07-10 16:25:43 +0200 |
commit | aa8dfbc421c1bcb5ba508802629c8005340f3a9e (patch) | |
tree | 6f588f8c9890c4373dbecab51b51742afcb24321 | |
parent | e1ca9e1f6db97052a0ebea6591f323b12b1e0020 (diff) |
Fix error handling in get_header_and_data.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3896)
-rw-r--r-- | crypto/pem/pem_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
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. */ |