diff options
Diffstat (limited to 'openssl/crypto/des/des.c')
-rw-r--r-- | openssl/crypto/des/des.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openssl/crypto/des/des.c b/openssl/crypto/des/des.c index 2bff28125..586aed723 100644 --- a/openssl/crypto/des/des.c +++ b/openssl/crypto/des/des.c @@ -455,8 +455,10 @@ void doencryption(void) rem = l % 8; len = l - rem; if (feof(DES_IN)) { - for (i = 7 - rem; i > 0; i--) - RAND_pseudo_bytes(buf + l++, 1); + for (i = 7 - rem; i > 0; i--) { + if (RAND_pseudo_bytes(buf + l++, 1) < 0) + goto problems; + } buf[l++] = rem; ex = 1; len += rem; |