summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--win32/win32.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b045152b6..07a15d3c66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jun 27 23:55:50 2002 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (rb_w32_stat): fix buffer overflow. (ruby-bugs:PR#329)
+
Thu Jun 27 20:57:45 2002 Tanaka Akira <akr@m17n.org>
* lib/prettyprint.rb, lib/pp.rb: convenience methods added.
diff --git a/win32/win32.c b/win32/win32.c
index 24699be9cf..6f0133b3dc 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2456,7 +2456,7 @@ int
rb_w32_stat(const char *path, struct stat *st)
{
const char *p;
- char *buf1 = ALLOCA_N(char, strlen(path) + 1);
+ char *buf1 = ALLOCA_N(char, strlen(path) + 2);
char *buf2 = ALLOCA_N(char, MAXPATHLEN);
char *s;
int len;