vim crash when $PATH is empty.
below is a patch. check please.

- Yasuhiro Matsumoto

diff -r 1ccc1ace9e5b src/ex_getln.c
--- a/src/ex_getln.c    Wed Nov 03 22:32:24 2010 +0100
+++ b/src/ex_getln.c    Tue Nov 09 13:02:54 2010 +0900
@@ -4746,8 +4746,10 @@
     else if ((pat[0] == '.' && (vim_ispathsep(pat[1])
                            || (pat[1] == '.' && vim_ispathsep(pat[2])))))
        path = (char_u *)".";
-    else
-       path = vim_getenv((char_u *)"PATH", &mustfree);
+    else {
+       if ((path = vim_getenv((char_u *)"PATH", &mustfree)))
+           path = "";
+    }

     /*
      * Go over all directories in $PATH.  Expand matches in that
directory and
diff -r 1ccc1ace9e5b src/os_win32.c
--- a/src/os_win32.c    Wed Nov 03 22:32:24 2010 +0100
+++ b/src/os_win32.c    Tue Nov 09 13:02:54 2010 +0900
@@ -232,7 +232,7 @@
             * "!xxd" it's found in our starting directory.  Needed because
             * SearchPath() also looks there. */
            p = mch_getenv("PATH");
-           if (STRLEN(p) + STRLEN(exe_path) + 2 < MAXPATHL)
+           if (p != NULL && STRLEN(p) + STRLEN(exe_path) + 2 < MAXPATHL)
            {
                STRCPY(temp, p);
                STRCAT(temp, ";");

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

Raspunde prin e-mail lui