To: vim-dev@vim.org Subject: Patch 6.0.010 Fcc: outbox From: Bram Moolenaar ------------ Patch 6.0.010 Problem: Using "gf" on a file name starting with "./" or "../" in a buffer without a name causes a crash. (Roy Lewis) Solution: Check for a NULL file name. Files: src/misc2.c *** ../vim60.9/src/misc2.c Wed Sep 26 16:20:26 2001 --- src/misc2.c Sun Sep 30 10:47:02 2001 *************** *** 4805,4812 **** for (run = 1; run <= 2; ++run) { l = (int)STRLEN(file_to_find); ! if (run == 1 && rel_to_curdir && (options & FNAME_REL) ! && STRLEN(rel_fname) + l < MAXPATHL) { STRCPY(NameBuff, rel_fname); STRCPY(gettail(NameBuff), file_to_find); --- 4805,4815 ---- for (run = 1; run <= 2; ++run) { l = (int)STRLEN(file_to_find); ! if (run == 1 ! && rel_to_curdir ! && (options & FNAME_REL) ! && rel_fname != NULL ! && STRLEN(rel_fname) + l < MAXPATHL) { STRCPY(NameBuff, rel_fname); STRCPY(gettail(NameBuff), file_to_find); *** ../vim60.9/src/version.c Sun Sep 30 10:50:44 2001 --- src/version.c Sun Sep 30 10:49:23 2001 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 10, /**/ -- Q: How to decide if I should clean my house or work on improving Vim? A: Depends on which has more bugs. /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///