Ken Takata wrote:

> Hi,
> 
> Vim crashes on Windows when opening very long filename if enc is utf-8.
> 
> How to reproduce:
> 
> 1. Create a file with very long name.
> 
> echo 
> foo>aaああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ.txt
> 
> Note that this filename is shorter than MAX_PATH (260) bytes in the current
> codepage, but longer than MAX_PATH bytes in utf-8.
> 
> 2. Open the file with a wildcard. 'enc' should be utf-8.
> 
> vim -u NONE --cmd "set enc=utf-8" aa*.txt
> 
> 
> This is caused by that allocated buffer is not enough.
> Following patch fixes this:

Thanks.  Is there any corner case where we would need a few more bytes
than MAXPATHL?

-- 
hundred-and-one symptoms of being an internet addict:
64. The remote to the T.V. is missing...and you don't even care.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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.

Raspunde prin e-mail lui