diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-08-05 15:56:11 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-08-05 15:56:11 +0000 |
commit | 405f3821444d67201f999c86b6c534a081cf10e7 (patch) | |
tree | 98b058cee8be156546c241c659c97a30c2009bb3 /crypto/cms | |
parent | a7502735467f529560a4dd1defd1f46a17ba2c06 (diff) |
Fix from HEAD.
Diffstat (limited to 'crypto/cms')
-rw-r--r-- | crypto/cms/cms_smime.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c index f79c504e91..b35d28d411 100644 --- a/crypto/cms/cms_smime.c +++ b/crypto/cms/cms_smime.c @@ -89,11 +89,13 @@ static int cms_copy_content(BIO *out, BIO *in, unsigned int flags) if (!BIO_get_cipher_status(in)) goto err; } + if (i < 0) + goto err; break; } - if (tmpout) - BIO_write(tmpout, buf, i); + if (tmpout && (BIO_write(tmpout, buf, i) != i)) + goto err; } if(flags & CMS_TEXT) |