diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-05-25 21:37:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-05-25 21:37:17 +0200 |
commit | 07e8db1da55381fe5ace0aa8f29c0cbaf2020fc2 (patch) | |
tree | b18fb4ea9c24c3114d0b0db31d7cf724447aa80f | |
parent | 6dc79f28902af22de6097e66a482e0c67d829395 (diff) | |
download | vim-git-07e8db1da55381fe5ace0aa8f29c0cbaf2020fc2.tar.gz |
updated for version 7.2.438v7.2.438
Problem: "vim -r" crashes.
Solution: Don't use NULL pointer argument.
-rw-r--r-- | src/memline.c | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/memline.c b/src/memline.c index 74f94ed41..84ce2d585 100644 --- a/src/memline.c +++ b/src/memline.c @@ -1404,15 +1404,22 @@ recover_names(fname, list, nr) int i; char_u *dirp; char_u *dir_name; - char_u *fname_res = *fname; + char_u *fname_res = NULL; #ifdef HAVE_READLINK char_u fname_buf[MAXPATHL]; +#endif + if (fname != NULL) + { +#ifdef HAVE_READLINK /* Expand symlink in the file name, because the swap file is created with * the actual file instead of with the symlink. */ if (resolve_symlink(*fname, fname_buf) == OK) fname_res = fname_buf; + else #endif + fname_res = *fname; + } if (list) { diff --git a/src/version.c b/src/version.c index 7a0642a22..31a49be37 100644 --- a/src/version.c +++ b/src/version.c @@ -682,6 +682,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 438, +/**/ 437, /**/ 436, |