diff src/misc2.c @ 5151:d0288faf3086 v7.4a.002

updated for version 7.4a.002 Problem: Valgrind errors in test 89. (Simon Ruderich) Solution: Allocate one more byte. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Sun, 07 Jul 2013 16:15:35 +0200
parents 6f24376028af
children 6bbb2ae990c9
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -4712,7 +4712,8 @@ vim_findfile_init(path, filename, stopdi
 	    {
 		wc_path = vim_strsave(search_ctx->ffsc_wc_path);
 		temp = alloc((int)(STRLEN(search_ctx->ffsc_wc_path)
-				 + (STRLEN(search_ctx->ffsc_fix_path)) - len));
+				 + STRLEN(search_ctx->ffsc_fix_path + len)
+				 + 1));
 	    }
 
 	    if (temp == NULL || wc_path == NULL)