mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (isUNCRoot): should check NUL after '.'.
[ruby-dev:24590] * win32/win32.c (isUNCRoot): fixed buffer overrun. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cdb66dc248
commit
b088595db7
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
Mon Oct 25 18:35:39 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (isUNCRoot): should check NUL after '.'.
|
||||
[ruby-dev:24590]
|
||||
|
||||
* win32/win32.c (isUNCRoot): fixed buffer overrun.
|
||||
|
||||
Mon Oct 25 08:03:26 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c (get_backtrace): ignore illegal backtrace. [ruby-dev:24587]
|
||||
|
|
|
@ -2811,7 +2811,7 @@ isUNCRoot(const char *path)
|
|||
{
|
||||
if (path[0] == '\\' && path[1] == '\\') {
|
||||
const char *p;
|
||||
for (p = path + 3; *p; p = CharNext(p)) {
|
||||
for (p = path + 2; *p; p = CharNext(p)) {
|
||||
if (*p == '\\')
|
||||
break;
|
||||
}
|
||||
|
@ -2820,7 +2820,7 @@ isUNCRoot(const char *path)
|
|||
if (*p == '\\')
|
||||
break;
|
||||
}
|
||||
if (!p[0] || !p[1] || (p[0] == '\\' && p[1] == '.'))
|
||||
if (!p[0] || !p[1] || (p[1] == '.' && !p[2]))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue