diff options
author | nobu <nobu@ruby-lang.org> | 2016-05-20 15:29:41 +0000 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-31 11:31:27 +0900 |
commit | 103f911e59d6ceb25a604228dc60376638e61db8 (patch) | |
tree | 63546113731fd4b24f3ef11d9cf0942f9f2d892e /ext | |
parent | f38501249f33bff7ca9d208670b8cde695ea8b7b (diff) | |
download | ruby-openssl-103f911e59d6ceb25a604228dc60376638e61db8.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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/ossl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index a0a7574c..b1a664ab 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; |