debian/changelog | 8 ++++++ debian/patches/905_passedPty.diff | 47 ++++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 3 files changed, 56 insertions(+)
New commits: commit 663c53556da5f6615d499402000bb9bfc1fc46f5 Author: Sven Joachim <svenj...@gmx.de> Date: Sun Mar 1 11:45:34 2015 +0100 Upload to unstable diff --git a/debian/changelog b/debian/changelog index 72f692a..b29201d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -xterm (312-2) UNRELEASED; urgency=medium +xterm (312-2) unstable; urgency=medium * Cherry-pick a patch from xterm 314: change passedPty[] to an allocated string to ensure it is long enough for the -S option value (Closes: #779397). - -- Sven Joachim <svenj...@gmx.de> Sun, 01 Mar 2015 11:34:52 +0100 + -- Sven Joachim <svenj...@gmx.de> Sun, 01 Mar 2015 11:45:01 +0100 xterm (312-1) unstable; urgency=medium commit 976a28a84cb9be75001b0606313e45e0118a27f7 Author: Sven Joachim <svenj...@gmx.de> Date: Sun Mar 1 11:43:13 2015 +0100 Fix buffer overflow in the -S option Change passedPty[] to an allocated string to ensure it is long enough for the -S option value. diff --git a/debian/changelog b/debian/changelog index 6b5ba0c..72f692a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +xterm (312-2) UNRELEASED; urgency=medium + + * Cherry-pick a patch from xterm 314: change passedPty[] to an + allocated string to ensure it is long enough for the -S option + value (Closes: #779397). + + -- Sven Joachim <svenj...@gmx.de> Sun, 01 Mar 2015 11:34:52 +0100 + xterm (312-1) unstable; urgency=medium * New upstream release. diff --git a/debian/patches/905_passedPty.diff b/debian/patches/905_passedPty.diff new file mode 100644 index 0000000..93765eb --- /dev/null +++ b/debian/patches/905_passedPty.diff @@ -0,0 +1,47 @@ +Description: Fix buffer overflow in the -S option + Change passedPty[] to an allocated string to ensure it is long enough for + the -S option value. +Author: Thomas Dickey <dic...@his.com> +Bug-Debian: https://bugs.debian.org/779397 + +--- + main.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/main.c ++++ b/main.c +@@ -779,7 +779,8 @@ static char etc_wtmp[] = WTMP_FILENAME; + static char bin_login[] = LOGIN_FILENAME; + #endif + +-static char passedPty[PTYCHARLEN + 1]; /* name if pty if slave */ ++static char noPassedPty[2]; ++static char *passedPty = noPassedPty; /* name if pty if slave */ + + #if defined(TIOCCONS) || defined(SRIOCSREDIR) + static int Console; +@@ -1760,7 +1761,8 @@ ParseSccn(char *option) + char *leaf = x_basename(option); + Bool code = False; + +- if (leaf != option) { ++ passedPty = x_strdup(option); ++ if (leaf != option) { + if (leaf - option > 0 + && isdigit(CharOf(*leaf)) + && sscanf(leaf, "%d", &am_slave) == 1) { +@@ -1771,13 +1773,13 @@ ParseSccn(char *option) + * the /dev/pts/XXX value, but since we do not need to reopen it, + * it is useful mainly for display in a "ps -ef". + */ +- strncpy(passedPty, option, len); + passedPty[len] = 0; + code = True; + } + } else { + code = (sscanf(option, "%c%c%d", + passedPty, passedPty + 1, &am_slave) == 3); ++ passedPty[2] = '\0'; + } + TRACE(("ParseSccn(%s) = '%s' %d (%s)\n", option, + passedPty, am_slave, code ? "OK" : "ERR")); diff --git a/debian/patches/series b/debian/patches/series index 0a584d1..c29fff3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 900_debian_xterm.diff 902_windowops.diff 904_fontops.diff +905_passedPty.diff -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1ys1qc-0000by...@moszumanska.debian.org