To: vim-dev@vim.org Subject: Patch 6.1b.027 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1b.027 Problem: "vim --remote +" may cause a crash. Solution: Check for missing file name argument. (Martin Kahlert) Files: src/main.c *** ../vim61b.026/src/main.c Sat Mar 9 16:17:30 2002 --- src/main.c Tue Mar 19 19:56:59 2002 *************** *** 2612,2617 **** --- 2612,2623 ---- { *serverStr = build_drop_cmd(*argc - i - 1, argv + i + 1, argtype == ARGTYPE_EDIT_WAIT); + if (*serverStr == NULL) + { + /* Probably out of memory, exit. */ + didone = TRUE; + break; + } Argc = i; } # ifdef FEAT_X11 *************** *** 2771,2777 **** filev++; filec--; } ! if (filec <= 0 || mch_dirname(cwd, MAXPATHL) != OK) return NULL; if ((p = vim_strsave_escaped(cwd, PATH_ESC_CHARS)) == NULL) return NULL; --- 2777,2786 ---- filev++; filec--; } ! /* Check if we have at least one argument. */ ! if (filec <= 0) ! mainerr_arg_missing((char_u *)filev[-1]); ! if (mch_dirname(cwd, MAXPATHL) != OK) return NULL; if ((p = vim_strsave_escaped(cwd, PATH_ESC_CHARS)) == NULL) return NULL; *** ../vim61b.026/src/version.c Tue Mar 19 19:45:31 2002 --- src/version.c Tue Mar 19 19:58:52 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 27, /**/ -- It is illegal for anyone to give lighted cigars to dogs, cats, and other domesticated animal kept as pets. [real standing law in Illinois, United States of America] /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///