summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/etc/etc.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8729b28..9567a55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 8 05:22:42 2014 Eric Wong <e@80x24.org>
+
+ * ext/etc/etc.c (etc_systmpdir): set default tmplen correctly
+ Fixup r47826
+
Wed Oct 8 05:16:32 2014 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* lib/matrix.rb: Add @- and @+ for Matrix and Vector.
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 6560dd9..94b9cc3 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -642,7 +642,7 @@ etc_systmpdir(void)
#else
const char default_tmp[] = "/tmp";
const char *tmpstr = default_tmp;
- size_t tmplen = 0;
+ size_t tmplen = strlen(default_tmp);
# if defined _CS_DARWIN_USER_TEMP_DIR
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024