0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

Fixes for coverity warnings.

This commit is contained in:
Bram Moolenaar
2010-07-31 16:44:19 +02:00
parent a26559b553
commit a9d52e3b79
11 changed files with 25 additions and 22 deletions

View File

@@ -3780,7 +3780,7 @@ vim_strsave_fnameescape(fname, shell)
/* '>' and '+' are special at the start of some commands, e.g. ":edit" and
* ":write". "cd -" has a special meaning. */
if (*p == '>' || *p == '+' || (*p == '-' && p[1] == NUL))
if (p != NULL && (*p == '>' || *p == '+' || (*p == '-' && p[1] == NUL)))
escape_fname(&p);
return p;