aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 15:29:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 15:29:41 +0000
commit1d6500b420565f539c311337ae4b2176c415ab21 (patch)
tree47ab340e1023af83e31b5c7e59fbf07c814c0ee9
parent181a0da63b6ef69f426b3e883763557507cdcead (diff)
downloadruby-1d6500b420565f539c311337ae4b2176c415ab21.tar.gz
ossl.c: suppress warnings
* ext/openssl/ossl.c (ossl_pem_passwd_cb): check integer precision. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/openssl/ossl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index a0a7574cc6..b1a664ab93 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -194,7 +194,7 @@ ossl_pem_passwd_cb(char *buf, int max_len, int flag, void *pwd_)
* work because it does not allow NUL characters and truncates to 1024
* bytes silently if the input is over 1024 bytes */
if (RB_TYPE_P(pass, T_STRING)) {
- len = RSTRING_LEN(pass);
+ len = RSTRING_LENINT(pass);
if (len >= OSSL_MIN_PWD_LEN && len <= max_len) {
memcpy(buf, RSTRING_PTR(pass), len);
return len;