From d9462e394a582b2698e13648c95acf22322ee766 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 11 Apr 2011 21:35:11 +0200 Subject: updated for version 7.3.161 Problem: Items on the stack may be too big. Solution: Make items static or allocate them. --- src/quickfix.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/quickfix.c') diff --git a/src/quickfix.c b/src/quickfix.c index 82826b27c..664b686bd 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -3049,8 +3049,8 @@ ex_vimgrep(eap) int flags = 0; colnr_T col; long tomatch; - char_u dirname_start[MAXPATHL]; - char_u dirname_now[MAXPATHL]; + char_u *dirname_start = NULL; + char_u *dirname_now = NULL; char_u *target_dir = NULL; #ifdef FEAT_AUTOCMD char_u *au_name = NULL; @@ -3128,6 +3128,11 @@ ex_vimgrep(eap) goto theend; } + dirname_start = alloc(MAXPATHL); + dirname_now = alloc(MAXPATHL); + if (dirname_start == NULL || dirname_now == NULL) + goto theend; + /* Remember the current directory, because a BufRead autocommand that does * ":lcd %:p:h" changes the meaning of short path names. */ mch_dirname(dirname_start, MAXPATHL); @@ -3364,6 +3369,8 @@ ex_vimgrep(eap) } theend: + vim_free(dirname_now); + vim_free(dirname_start); vim_free(target_dir); vim_free(regmatch.regprog); } -- cgit v1.2.1