diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-07 20:25:07 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-07 20:25:07 +0000 |
commit | 7fcf57412a627eb57ce028f9614b1f5113aec155 (patch) | |
tree | 809fcf4562f40ffc3a6c10a5bd576b9f6cb7a9bb /ext/etc | |
parent | a2ae7bccf8670865fddbfc1aa7f30ab536bb4814 (diff) | |
download | ruby-7fcf57412a627eb57ce028f9614b1f5113aec155.tar.gz |
ext/etc/etc.c (etc_systmpdir): set default tmplen correctly
Fixup r47826.
This fixes the following test failure for me:
TestRequire#test_tainted_loadpath [test/ruby/test_require.rb:331]:
SecurityError expected but nothing was raised.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc')
-rw-r--r-- | ext/etc/etc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c index 6560dd9461..94b9cc34f0 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 |