diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index aacdad9e632e0c7c095401efeb61ec90159a0113..2a52aca3b703ec9864ec597ab53abb4f48d8aa11 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. */