ruby-changes:29508
From: charliesome <ko1@a...>
Date: Sat, 22 Jun 2013 14:35:37 +0900 (JST)
Subject: [ruby-changes:29508] charliesome:r41560 (trunk): * ext/etc/etc.c (setup_passwd): pass 0 as VALUE to rb_struct_new to
charliesome 2013-06-22 14:35:23 +0900 (Sat, 22 Jun 2013) New Revision: 41560 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41560 Log: * ext/etc/etc.c (setup_passwd): pass 0 as VALUE to rb_struct_new to prevent segfault if the compiler passes it as a 32 bit integer on a 64 bit ruby Modified files: trunk/ChangeLog trunk/ext/etc/etc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 41559) +++ ChangeLog (revision 41560) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Jun 22 14:31:00 2013 Charlie Somerville <charliesome@r...> + + * ext/etc/etc.c (setup_passwd): pass 0 as VALUE to rb_struct_new to + prevent segfault if the compiler passes it as a 32 bit integer on + a 64 bit ruby + Sat Jun 22 13:47:13 2013 Tanaka Akira <akr@f...> * bignum.c (bary_pack): MEMZERO can be used even if nails is not zero. Index: ext/etc/etc.c =================================================================== --- ext/etc/etc.c (revision 41559) +++ ext/etc/etc.c (revision 41560) @@ -116,7 +116,7 @@ setup_passwd(struct passwd *pwd) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L116 #ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE INT2NUM(pwd->pw_expire), #endif - 0 /*dummy*/ + (VALUE)0 /*dummy*/ ); } #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/