It is my failure. I'm sorry. Two places...

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/os_win32.c b/src/os_win32.c
index 62a2bcdca..a452b9d99 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -3126,8 +3126,10 @@ mch_dirname(
 	{
 	    WCHAR   wcbuf[_MAX_PATH + 1];
 	    char_u  *p;
+	    DWORD   lfnlen;
 
-	    if (GetLongPathNameW(wbuf, wcbuf, _MAX_PATH) != 0)
+	    lfnlen = GetLongPathNameW(wbuf, wcbuf, _MAX_PATH);
+	    if (lfnlen != 0 && lfnlen < _MAX_PATH)
 		p = utf16_to_enc(wcbuf, NULL);
 	    else
 		p = utf16_to_enc(wbuf, NULL);

Raspunde prin e-mail lui