diff --git a/screen-4.4.0-terminal-segfault.patch b/screen-4.4.0-terminal-segfault.patch new file mode 100644 index 0000000..1ed2cc3 --- /dev/null +++ b/screen-4.4.0-terminal-segfault.patch @@ -0,0 +1,30 @@ +diff -rNup orig/window.c new/window.c +--- orig/window.c 2016-06-19 21:41:03.000000000 +0200 ++++ new/window.c 2016-09-14 08:15:56.866662539 +0200 +@@ -1206,7 +1206,7 @@ struct win *win; + char **args, *ttyn; + { + int pid; +- char tebuf[25]; ++ char tebuf[MAXTERMLEN + 6]; // MAXTERMLEN + strlen("TERM=") + '\0' + char ebuf[20]; + char shellbuf[7 + MAXPATHLEN]; + char *proc; +@@ -1442,7 +1442,7 @@ char **args, *ttyn; + { + char *s1, *s2, tl; + +- sprintf(tebuf, "TERM=%s", win->w_term); ++ snprintf(tebuf, sizeof(tebuf), "TERM=%s", win->w_term); + debug2("Makewindow %d with %s\n", win->w_number, tebuf); + tl = strlen(win->w_term); + NewEnv[1] = tebuf; +@@ -1458,7 +1458,7 @@ char **args, *ttyn; + } + } + } +- sprintf(ebuf, "WINDOW=%d", win->w_number); ++ snprintf(ebuf, sizeof(ebuf), "WINDOW=%d", win->w_number); + NewEnv[3] = ebuf; + + if (*proc == '-') diff --git a/screen.spec b/screen.spec index 41f57f2..d9ed716 100644 --- a/screen.spec +++ b/screen.spec @@ -4,7 +4,7 @@ Summary: A screen manager that supports multiple logins on one terminal Name: screen Version: 4.4.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/System URL: http://www.gnu.org/software/screen @@ -25,6 +25,7 @@ Patch2: screen-4.3.1-screenrc.patch Patch3: screen-E3.patch Patch4: screen-4.3.1-suppress_remap.patch Patch5: screen-4.3.1-crypt.patch +Patch6: screen-4.4.0-terminal-segfault.patch %description The screen utility allows you to have multiple logins on just one @@ -43,6 +44,7 @@ support multiple logins on one terminal. %patch3 -p1 -b .E3 %patch4 -p1 -b .suppress_remap %patch5 -p1 -b .crypto +%patch6 -p1 -b .terminal-segfault %build @@ -140,6 +142,9 @@ fi %endif %changelog +* Wed Sep 14 2016 Josef Ridky - 4.4.0-2 +- fix problem with crash on new window when the terminal type is very long (#1350549) + * Wed Jun 22 2016 Petr Hracek - 4.4.0-1 - New upstream release 4.4.0 (#1348015)