[前][次][番号順一覧][スレッド一覧]

ruby-changes:43015

From: nobu <ko1@a...>
Date: Sat, 21 May 2016 00:29:47 +0900 (JST)
Subject: [ruby-changes:43015] nobu:r55089 (trunk): ossl.c: suppress warnings

nobu	2016-05-21 00:29:41 +0900 (Sat, 21 May 2016)

  New Revision: 55089

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55089

  Log:
    ossl.c: suppress warnings
    
    * ext/openssl/ossl.c (ossl_pem_passwd_cb): check integer
      precision.

  Modified files:
    trunk/ext/openssl/ossl.c
Index: ext/openssl/ossl.c
===================================================================
--- ext/openssl/ossl.c	(revision 55088)
+++ ext/openssl/ossl.c	(revision 55089)
@@ -194,7 +194,7 @@ ossl_pem_passwd_cb(char *buf, int max_le https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.c#L194
 	 * work because it does not allow NUL characters and truncates to 1024
 	 * bytes silently if the input is over 1024 bytes */
 	if (RB_TYPE_P(pass, T_STRING)) {
-	    len = RSTRING_LEN(pass);
+	    len = RSTRING_LENINT(pass);
 	    if (len >= OSSL_MIN_PWD_LEN && len <= max_len) {
 		memcpy(buf, RSTRING_PTR(pass), len);
 		return len;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]