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)
This commit is contained in:
Bernd Edlinger 2017-07-09 21:24:18 +02:00
parent e1ca9e1f6d
commit aa8dfbc421

View file

@ -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.
*/