diff options
author | Patrice Clement <monsieurp@gentoo.org> | 2015-09-15 23:14:26 +0000 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2015-09-15 23:24:17 +0000 |
commit | d2b61ecde95de8b30652d3d56973845c6ba41811 (patch) | |
tree | 23067e4a4f24c5dffa32fda21b6135abe878ba49 /app-misc/screen/files | |
parent | app-backup/obnam: fix python deps, minor cleanups (diff) | |
download | gentoo-d2b61ecde95de8b30652d3d56973845c6ba41811.tar.gz gentoo-d2b61ecde95de8b30652d3d56973845c6ba41811.tar.bz2 gentoo-d2b61ecde95de8b30652d3d56973845c6ba41811.zip |
app-misc/screen: Patch sources to mitigate a stack overflow. Fixes security bug 559394.
Package-Manager: portage-2.2.18
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'app-misc/screen/files')
-rw-r--r-- | app-misc/screen/files/screen-4.3.1-ansi.c.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app-misc/screen/files/screen-4.3.1-ansi.c.patch b/app-misc/screen/files/screen-4.3.1-ansi.c.patch new file mode 100644 index 000000000000..8dca52d463e4 --- /dev/null +++ b/app-misc/screen/files/screen-4.3.1-ansi.c.patch @@ -0,0 +1,37 @@ +--- ansi.c.orig 2015-09-15 22:55:48.274486000 +0000 ++++ ansi.c 2015-09-15 22:59:14.368486000 +0000 +@@ -2502,13 +2502,13 @@ + return; + if (n > 0) + { ++ if (ye - ys + 1 < n) ++ n = ye - ys + 1; + if (n > 256) + { + MScrollV(p, n - 256, ys, ye, bce); + n = 256; + } +- if (ye - ys + 1 < n) +- n = ye - ys + 1; + #ifdef COPY_PASTE + if (compacthist) + { +@@ -2562,15 +2562,14 @@ + } + else + { ++ n = -n; ++ if (ye - ys + 1 < n) ++ n = ye - ys + 1; + if (n < -256) + { + MScrollV(p, n + 256, ys, ye, bce); + n = -256; + } +- n = -n; +- if (ye - ys + 1 < n) +- n = ye - ys + 1; +- + ml = p->w_mlines + ye; + /* Clear lines */ + for (i = ye; i > ye - n; i--, ml--) |