diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-08-05 15:55:53 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-08-05 15:55:53 +0000 |
commit | 6d6c47980e943f3946b3894ac341d61e3c908c92 (patch) | |
tree | b5438f33d45800d92f2a76a892f6a0b80ae23917 /crypto/asn1 | |
parent | 474b3b1cc80a7c686d4a5fecc6836ec48c7c01d4 (diff) |
Correctly handle errors in CMS I/O code.
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/asn_mime.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c index 8fbdf21337..c1d1b12291 100644 --- a/crypto/asn1/asn_mime.c +++ b/crypto/asn1/asn_mime.c @@ -592,6 +592,8 @@ int SMIME_text(BIO *in, BIO *out) sk_MIME_HEADER_pop_free(headers, mime_hdr_free); while ((len = BIO_read(in, iobuf, sizeof(iobuf))) > 0) BIO_write(out, iobuf, len); + if (len < 0) + return 0; return 1; } |