summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_rand.c')
-rw-r--r--ext/openssl/ossl_rand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c
index 7d4e0b8..270a4b7 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;
}