Ken Takata wrote: > I found that wrong buffer size is used in modify_fname(). > The allocated size is _MAX_PATH+1 (261), but MAXPATHL (1024) might be used. > The following patch fixes it: > > diff --git a/src/eval.c b/src/eval.c > --- a/src/eval.c > +++ b/src/eval.c > @@ -24811,7 +24811,7 @@ repeat: > p = alloc(_MAX_PATH + 1); > if (p != NULL) > { > - if (GetLongPathName(*fnamep, p, MAXPATHL)) > + if (GetLongPathName(*fnamep, p, _MAX_PATH)) > { > vim_free(*bufp); > *bufp = *fnamep = p;
Thanks. I'll include this. I wonder about encoding, is the returned file name in the current codepage? It should probably be converted to 'encoding' then. But perhaps we should use the wide version? -- Every exit is an entrance into something else. /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.