summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-27 14:57:10 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-27 14:57:10 +0000
commitad8c8144d4abcfa3c263add80b1b33013a1cb8ba (patch)
tree8f59c20b1c7899aabe3c4b660281207f0370cc0e /win32
parent571ff1d6b974eab38d4707d41f071a176960704b (diff)
* win32/win32.c (rb_w32_stat): fix buffer overflow. (ruby-bugs:PR#329)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 24699be..6f0133b 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;