projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Correctly handle errors in CMS I/O code.
[openssl.git]
/
crypto
/
cms
/
cms_smime.c
diff --git
a/crypto/cms/cms_smime.c
b/crypto/cms/cms_smime.c
index 8e3221b7269ed77427edee600bd8f9364abfaf34..dec8ef32f87d76df48866807bf01a9150fc4c6d7 100644
(file)
--- 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)