summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-19 15:45:53 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-19 15:45:53 +0000
commitc76e05783072eb92ca586df32c1da2432a437814 (patch)
tree863dd6cad2d234bf80bc6958573aaef51897fdf2
parent09b1fb78ea3397ea5c19ce35fd087f4924e4a3c4 (diff)
downloadruby-c76e05783072eb92ca586df32c1da2432a437814.tar.gz
ruby-c76e05783072eb92ca586df32c1da2432a437814.tar.xz
ruby-c76e05783072eb92ca586df32c1da2432a437814.zip
* util.c (ruby_getcwd): the content of buf is uncertain and must
not be printed when getcwd(buf, size) has failed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--util.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ff24f8fab..bfeda548f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 20 00:36:43 2002 Akinori MUSHA <knu@iDaemons.org>
+
+ * util.c (ruby_getcwd): the content of buf is uncertain and must
+ not be printed when getcwd(buf, size) has failed.
+
Mon Mar 18 22:19:52 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* ext/stringio/stringio.c (check_modifiable): wrong declaration.
diff --git a/util.c b/util.c
index 26a35ed39..512b00b47 100644
--- a/util.c
+++ b/util.c
@@ -642,7 +642,7 @@ ruby_getcwd()
char *buf = xmalloc(size);
while (!getcwd(buf, size)) {
- if (errno != ERANGE) rb_sys_fail(buf);
+ if (errno != ERANGE) rb_sys_fail(NULL);
size *= 2;
buf = xrealloc(buf, size);
}