summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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