* 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
This commit is contained in:
usa 2002-06-27 14:57:10 +00:00
parent 571ff1d6b9
commit ad8c8144d4
2 changed files with 5 additions and 1 deletions

View File

@ -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> Thu Jun 27 20:57:45 2002 Tanaka Akira <akr@m17n.org>
* lib/prettyprint.rb, lib/pp.rb: convenience methods added. * lib/prettyprint.rb, lib/pp.rb: convenience methods added.

View File

@ -2456,7 +2456,7 @@ int
rb_w32_stat(const char *path, struct stat *st) rb_w32_stat(const char *path, struct stat *st)
{ {
const char *p; 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 *buf2 = ALLOCA_N(char, MAXPATHLEN);
char *s; char *s;
int len; int len;