mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
ca8f4683ff
commit
1246e48397
1 changed files with 1 additions and 1 deletions
|
@ -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
|
* work because it does not allow NUL characters and truncates to 1024
|
||||||
* bytes silently if the input is over 1024 bytes */
|
* bytes silently if the input is over 1024 bytes */
|
||||||
if (RB_TYPE_P(pass, T_STRING)) {
|
if (RB_TYPE_P(pass, T_STRING)) {
|
||||||
len = RSTRING_LEN(pass);
|
len = RSTRING_LENINT(pass);
|
||||||
if (len >= OSSL_MIN_PWD_LEN && len <= max_len) {
|
if (len >= OSSL_MIN_PWD_LEN && len <= max_len) {
|
||||||
memcpy(buf, RSTRING_PTR(pass), len);
|
memcpy(buf, RSTRING_PTR(pass), len);
|
||||||
return len;
|
return len;
|
||||||
|
|
Loading…
Reference in a new issue