diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-30 14:54:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-30 14:54:09 +0000 |
commit | e680bfb1aba5438d5f0912b0712e5eb7d96239e0 (patch) | |
tree | 55c84a6662afab66999bc08468e9f4a337ab2290 /ext | |
parent | 88b745f0ca4b4c87d186372d86d7d2589a9e4f6f (diff) | |
download | ruby-e680bfb1aba5438d5f0912b0712e5eb7d96239e0.tar.gz |
ossl.c: cast
* ext/openssl/ossl.c (ossl_pem_passwd_cb): cast to int. it's safe
because len does not exceed int max_len.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56948 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 8269599fff..eb71b643bf 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -180,7 +180,7 @@ ossl_pem_passwd_cb(char *buf, int max_len, int flag, void *pwd_) len = RSTRING_LEN(pass); if (len >= OSSL_MIN_PWD_LEN && len <= max_len) { memcpy(buf, RSTRING_PTR(pass), len); - return len; + return (int)len; } } OSSL_Debug("passed data is not valid String???"); |