1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2016-11-30 14:54:09 +00:00
parent 88b745f0ca
commit e680bfb1ab

View file

@ -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???");