diff options
Diffstat (limited to 'ext/openssl/ossl_rand.c')
-rw-r--r-- | ext/openssl/ossl_rand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c index 7d4e0b8a10..270a4b7437 100644 --- a/ext/openssl/ossl_rand.c +++ b/ext/openssl/ossl_rand.c @@ -37,7 +37,7 @@ static VALUE ossl_rand_seed(VALUE self, VALUE str) { StringValue(str); - RAND_seed(RSTRING_PTR(str), RSTRING_LEN(str)); + RAND_seed(RSTRING_PTR(str), RSTRING_LENINT(str)); return str; } @@ -51,7 +51,7 @@ static VALUE ossl_rand_add(VALUE self, VALUE str, VALUE entropy) { StringValue(str); - RAND_add(RSTRING_PTR(str), RSTRING_LEN(str), NUM2DBL(entropy)); + RAND_add(RSTRING_PTR(str), RSTRING_LENINT(str), NUM2DBL(entropy)); return self; } |