summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-22 05:35:23 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-22 05:35:23 +0000
commit1a2c400273620939d596fef3eacf95750cfdb039 (patch)
tree4ac6e644e63cf6c2e134cd7ea3c6a6e37c8dadc1
parent042fe1ea912903ce34feca4c24e6231135748259 (diff)
* 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/etc/etc.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b1f453..8c72138 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Jun 22 14:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+
+ * 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@fsij.org>
* bignum.c (bary_pack): MEMZERO can be used even if nails is not zero.
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index de06c74..1c52535 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -116,7 +116,7 @@ setup_passwd(struct passwd *pwd)
#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
INT2NUM(pwd->pw_expire),
#endif
- 0 /*dummy*/
+ (VALUE)0 /*dummy*/
);
}
#endif