aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/asn1/asn_mime.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/asn1/asn_mime.c')
-rw-r--r--openssl/crypto/asn1/asn_mime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openssl/crypto/asn1/asn_mime.c b/openssl/crypto/asn1/asn_mime.c
index 7e2f28e6d..96110c540 100644
--- a/openssl/crypto/asn1/asn_mime.c
+++ b/openssl/crypto/asn1/asn_mime.c
@@ -289,7 +289,8 @@ int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
if ((flags & SMIME_DETACHED) && data) {
/* We want multipart/signed */
/* Generate a random boundary */
- RAND_pseudo_bytes((unsigned char *)bound, 32);
+ if (RAND_pseudo_bytes((unsigned char *)bound, 32) < 0)
+ return 0;
for (i = 0; i < 32; i++) {
c = bound[i] & 0xf;
if (c < 10)