ruby-changes:44875
From: nobu <ko1@a...>
Date: Wed, 30 Nov 2016 23:54:15 +0900 (JST)
Subject: [ruby-changes:44875] nobu:r56948 (trunk): ossl.c: cast
nobu 2016-11-30 23:54:09 +0900 (Wed, 30 Nov 2016) New Revision: 56948 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56948 Log: 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. Modified files: trunk/ext/openssl/ossl.c Index: ext/openssl/ossl.c =================================================================== --- ext/openssl/ossl.c (revision 56947) +++ ext/openssl/ossl.c (revision 56948) @@ -180,7 +180,7 @@ ossl_pem_passwd_cb(char *buf, int max_le https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.c#L180 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???"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/