5 Commits
3.1a ... 3.1c

Author SHA1 Message Date
Nicholas Marriott
25cae5d86f 3.1c. 2020-10-30 12:11:02 +00:00
nicm
d0ad34e94d Do not write after the end of the array and overwrite the stack when
colon-separated SGR sequences contain empty arguments. Reported by Sergey
Nizovtsev.
2020-10-30 12:09:52 +00:00
Nicholas Marriott
a10c4c60cb Add to CHANGES. 2020-05-04 09:06:57 +01:00
Nicholas Marriott
846b99e0cb Portable does not need sys/queue.h. 2020-05-03 10:49:16 +01:00
Nicholas Marriott
6a33a12798 Do not remove the automatic-rename option from the global set, only from
the window (it must stay in the global set or tmux will crash). GitHub
issue 2188.
2020-04-30 15:20:08 +01:00
4 changed files with 18 additions and 4 deletions

10
CHANGES
View File

@@ -1,3 +1,13 @@
CHANGED FROM 3.1b TO 3.1c
* Fix a stack overflow on colon-separated CSI parsing.
CHANGES FROM 3.1a TO 3.1b
* Fix build on systems without sys/queue.h.
* Fix crash when allow-rename is on and an empty name is set.
CHANGES FROM 3.1 TO 3.1a CHANGES FROM 3.1 TO 3.1a
* Do not close stdout prematurely in control mode since it is needed to print * Do not close stdout prematurely in control mode since it is needed to print

View File

@@ -1,6 +1,6 @@
# configure.ac # configure.ac
AC_INIT([tmux], 3.1a) AC_INIT([tmux], 3.1c)
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_CONFIG_AUX_DIR(etc) AC_CONFIG_AUX_DIR(etc)

1
file.c
View File

@@ -17,7 +17,6 @@
*/ */
#include <sys/types.h> #include <sys/types.h>
#include <sys/queue.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>

View File

@@ -1929,8 +1929,13 @@ input_csi_dispatch_sgr_colon(struct input_ctx *ictx, u_int i)
free(copy); free(copy);
return; return;
} }
} else } else {
n++; n++;
if (n == nitems(p)) {
free(copy);
return;
}
}
log_debug("%s: %u = %d", __func__, n - 1, p[n - 1]); log_debug("%s: %u = %d", __func__, n - 1, p[n - 1]);
} }
free(copy); free(copy);
@@ -2304,7 +2309,7 @@ input_exit_rename(struct input_ctx *ictx)
return; return;
if (ictx->input_len == 0) { if (ictx->input_len == 0) {
oe = options_get(wp->window->options, "automatic-rename"); oe = options_get_only(wp->window->options, "automatic-rename");
if (oe != NULL) if (oe != NULL)
options_remove(oe); options_remove(oe);
return; return;