summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-30 14:54:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-30 14:54:09 +0000
commite680bfb1aba5438d5f0912b0712e5eb7d96239e0 (patch)
tree55c84a6662afab66999bc08468e9f4a337ab2290 /ext/openssl/ossl.c
parent88b745f0ca4b4c87d186372d86d7d2589a9e4f6f (diff)
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/openssl/ossl.c')
-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 8269599..eb71b64 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???");