ruby-changes:48307
From: nobu <ko1@a...>
Date: Wed, 25 Oct 2017 17:37:29 +0900 (JST)
Subject: [ruby-changes:48307] nobu:r60421 (trunk): win32.c: unknown reparse tags
nobu 2017-10-25 17:37:17 +0900 (Wed, 25 Oct 2017) New Revision: 60421 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60421 Log: win32.c: unknown reparse tags * win32/win32.c (rb_w32_read_reparse_point): skip unknown reparse tags. [ruby-core:83539] [Bug #14047] Modified files: trunk/win32/win32.c Index: win32/win32.c =================================================================== --- win32/win32.c (revision 60420) +++ win32/win32.c (revision 60421) @@ -5017,7 +5017,7 @@ rb_w32_read_reparse_point(const WCHAR *p https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L5017 ret = rp->SymbolicLinkReparseBuffer.PrintNameLength; *len = ret / sizeof(WCHAR); } - else { /* IO_REPARSE_TAG_MOUNT_POINT */ + else if (rp->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) { static const WCHAR *volume = L"Volume{"; enum {volume_prefix_len = rb_strlen_lit("\\??\\")}; name = ((char *)rp->MountPointReparseBuffer.PathBuffer + @@ -5030,6 +5030,9 @@ rb_w32_read_reparse_point(const WCHAR *p https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L5030 memcmp(name, volume, sizeof(volume) - 1 * sizeof(WCHAR)) == 0) return -1; } + else { + return -1; + } *result = name; if (e) { if ((char *)name + ret + sizeof(WCHAR) > (char *)rp + bufsize) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/