summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2003-11-29 16:40:53 +0000
committerNed Ludd <solar@gentoo.org>2003-11-29 16:40:53 +0000
commitbaf2d4639d7506cf8c65d100d0036d2af2d4704c (patch)
tree025682d1c68a739225b353c511a64439ba258e21 /app-misc/screen/files
parentcorrected integer overflows in ansi.c/resize.c max window height/width is now... (diff)
downloadgentoo-2-baf2d4639d7506cf8c65d100d0036d2af2d4704c.tar.gz
gentoo-2-baf2d4639d7506cf8c65d100d0036d2af2d4704c.tar.bz2
gentoo-2-baf2d4639d7506cf8c65d100d0036d2af2d4704c.zip
corrected integer overflows in ansi.c/resize.c max window height/width is now 1000x1000 Bug: #34599
Diffstat (limited to 'app-misc/screen/files')
-rw-r--r--app-misc/screen/files/digest-screen-4.0.1-r11
-rw-r--r--app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch31
2 files changed, 32 insertions, 0 deletions
diff --git a/app-misc/screen/files/digest-screen-4.0.1-r1 b/app-misc/screen/files/digest-screen-4.0.1-r1
new file mode 100644
index 000000000000..80f199b5715c
--- /dev/null
+++ b/app-misc/screen/files/digest-screen-4.0.1-r1
@@ -0,0 +1 @@
+MD5 2f674d5a7a299abf085d0b69c90de4f8 screen-4.0.1.tar.gz 837445
diff --git a/app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch b/app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch
new file mode 100644
index 000000000000..4a40c8dd2c7c
--- /dev/null
+++ b/app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch
@@ -0,0 +1,31 @@
+--- ansi.c.orig 2003-09-08 10:24:44.000000000 -0400
++++ ansi.c 2003-11-29 10:41:15.000000000 -0500
+@@ -559,7 +559,7 @@
+ {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+- if (curr->w_NumArgs < MAXARGS)
++ if (curr->w_NumArgs >= 0 && curr->w_NumArgs < MAXARGS)
+ {
+ if (curr->w_args[curr->w_NumArgs] < 100000000)
+ curr->w_args[curr->w_NumArgs] =
+--- resize.c.orig 2003-09-08 10:26:31.000000000 -0400
++++ resize.c 2003-11-29 10:41:50.000000000 -0500
+@@ -682,6 +682,17 @@
+ if (wi == 0)
+ he = hi = 0;
+
++ if (wi > 1000)
++ {
++ Msg(0, "Window width too large, truncated");
++ wi = 1000;
++ }
++ if (he > 1000)
++ {
++ Msg(0, "Window height too large, truncated");
++ he = 1000;
++ }
++
+ if (p->w_width == wi && p->w_height == he && p->w_histheight == hi)
+ {
+ debug("ChangeWindowSize: No change.\n");