summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-06-16 11:21:37 -0400
committerRich Salz <rsalz@openssl.org>2016-06-16 14:39:56 -0400
commitd0a2bb1f94e26c2e7b44676e9b739c23ad763a79 (patch)
tree248128baf1bbd8b2aefaf306bec25be8fb4f103b
parentc144b4edda9177ab42c0fa94977098763074f912 (diff)
RT4545: Backport 2877 to 1.0.2
Sender verified that the fix works. This is a backport/cherry-pick of just the bugfix part of 0f91e1dff4ab2e7c25bbae5a48dfabbd1a4eae3c Reviewed-by: Richard Levitte <levitte@openssl.org>
-rw-r--r--crypto/rand/md_rand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c
index 5c13d57765..bd76e23e3d 100644
--- a/crypto/rand/md_rand.c
+++ b/crypto/rand/md_rand.c
@@ -136,7 +136,7 @@
/* #define PREDICT 1 */
#define STATE_SIZE 1023
-static int state_num = 0, state_index = 0;
+static size_t state_num = 0, state_index = 0;
static unsigned char state[STATE_SIZE + MD_DIGEST_LENGTH];
static unsigned char md[MD_DIGEST_LENGTH];
static long md_count[2] = { 0, 0 };
@@ -336,8 +336,8 @@ static void ssleay_rand_seed(const void *buf, int num)
int ssleay_rand_bytes(unsigned char *buf, int num, int pseudo, int lock)
{
static volatile int stirred_pool = 0;
- int i, j, k, st_num, st_idx;
- int num_ceil;
+ int i, j, k;
+ size_t num_ceil, st_idx, st_num;
int ok;
long md_c[2];
unsigned char local_md[MD_DIGEST_LENGTH];