summaryrefslogtreecommitdiffstats
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-04-11 21:35:11 +0200
committerBram Moolenaar <Bram@vim.org>2011-04-11 21:35:11 +0200
commitd9462e394a582b2698e13648c95acf22322ee766 (patch)
treeaf599d1593650fcac4b64dfd3503836ce0e10070 /src/quickfix.c
parentef9d6aa70d68cd3a765ed55f4c3781aeb8aeea23 (diff)
updated for version 7.3.161v7.3.161
Problem: Items on the stack may be too big. Solution: Make items static or allocate them.
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 82826b27cb..664b686bd7 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);
}