diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-04-11 21:35:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-04-11 21:35:11 +0200 |
commit | d9462e394a582b2698e13648c95acf22322ee766 (patch) | |
tree | af599d1593650fcac4b64dfd3503836ce0e10070 /src/netbeans.c | |
parent | ef9d6aa70d68cd3a765ed55f4c3781aeb8aeea23 (diff) | |
download | vim-git-d9462e394a582b2698e13648c95acf22322ee766.tar.gz |
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/netbeans.c')
-rw-r--r-- | src/netbeans.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/netbeans.c b/src/netbeans.c index 874edf41c..5b9161d82 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -2891,7 +2891,7 @@ netbeans_beval_cb( char_u *text; linenr_T lnum; int col; - char buf[MAXPATHL * 2 + 25]; + char *buf; char_u *p; /* Don't do anything when 'ballooneval' is off, messages scrolled the @@ -2905,15 +2905,20 @@ netbeans_beval_cb( * length. */ if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL) { - p = nb_quote(text); - if (p != NULL) + buf = (char *)alloc(MAXPATHL * 2 + 25); + if (buf != NULL) { - vim_snprintf(buf, sizeof(buf), - "0:balloonText=%d \"%s\"\n", r_cmdno, p); - vim_free(p); + p = nb_quote(text); + if (p != NULL) + { + vim_snprintf(buf, MAXPATHL * 2 + 25, + "0:balloonText=%d \"%s\"\n", r_cmdno, p); + vim_free(p); + } + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_beval_cb"); + vim_free(buf); } - nbdebug(("EVT: %s", buf)); - nb_send(buf, "netbeans_beval_cb"); } vim_free(text); } |