summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ext/socket/socket.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e711f7c639e..869da531000 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jan 1 17:26:47 2009 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/socket.c (setup_domain_and_type): initialize ptr.
+
Thu Jan 1 17:01:50 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/mkconstants.rb: refine family_to_int.
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 8b306197338..4bf7fc02170 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -2293,7 +2293,8 @@ setup_domain_and_type(VALUE domain, int *dv, VALUE type, int *tv)
int family;
domain = tmp;
rb_check_safe_obj(domain);
- family = family_to_int(RSTRING_PTR(domain), RSTRING_LEN(domain));
+ ptr = RSTRING_PTR(domain);
+ family = family_to_int(ptr, RSTRING_LEN(domain));
if (family == -1)
rb_raise(rb_eSocket, "unknown socket domain %s", ptr);
*dv = family;