dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 68a105e5b0d1997d5863976bcab77127e245b671
parent e80f85ea86fb75186b23a7f4165a09b556abd3a9
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue, 17 Feb 2015 21:59:42 +0100

Fix pointer to out of scope local #30137

Diffstat:
dvtm.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dvtm.c b/dvtm.c @@ -1052,14 +1052,13 @@ copymode(const char *args[]) { if (!ed) ed = editors[0].name; - const char **argv = (const char*[]){ ed, "-", NULL }; + const char **argv = (const char*[]){ ed, "-", NULL, NULL }; + char argline[32]; for (unsigned int i = 0; i < LENGTH(editors); i++) { if (!strcmp(editors[i].name, ed)) { - argv = (const char*[]){ ed, NULL, NULL, NULL, NULL, NULL, NULL }; for (int j = 1; editors[i].argv[j]; j++) { if (strstr(editors[i].argv[j], "%d")) { - char argline[32]; int line = vt_content_start(sel->app); snprintf(argline, sizeof(argline), "+%d", line); argv[j] = argline;