diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2009-01-05 21:36:40 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2009-01-05 21:36:40 +0000 |
commit | e3e8dff41f7ab5012303998d65d07ce01ada07e2 (patch) | |
tree | c6cef98b54fd1efd88b1c72165b5f7c8f71b2c3b /lib/libcrypto/cms | |
parent | f751973bbcd73eee61aa30d9dd8eee9e79df852c (diff) |
update to openssl-0.9.8i; tested by several, especially krw@
Diffstat (limited to 'lib/libcrypto/cms')
-rw-r--r-- | lib/libcrypto/cms/cms_smime.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libcrypto/cms/cms_smime.c b/lib/libcrypto/cms/cms_smime.c index f79c504e913..b35d28d411a 100644 --- a/lib/libcrypto/cms/cms_smime.c +++ b/lib/libcrypto/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) |