From ad8c8144d4abcfa3c263add80b1b33013a1cb8ba Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 27 Jun 2002 14:57:10 +0000 Subject: * 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 --- win32/win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'win32/win32.c') 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; -- cgit v1.2.3