Contents of /trunk/screen/patches/screen-4.0.1-int-overflow-fix.patch
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 930 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 930 byte(s)
-import
1 | --- ansi.c.orig 2003-09-08 10:24:44.000000000 -0400 |
2 | +++ ansi.c 2003-11-29 10:41:15.000000000 -0500 |
3 | @@ -559,7 +559,7 @@ |
4 | { |
5 | case '0': case '1': case '2': case '3': case '4': |
6 | case '5': case '6': case '7': case '8': case '9': |
7 | - if (curr->w_NumArgs < MAXARGS) |
8 | + if (curr->w_NumArgs >= 0 && curr->w_NumArgs < MAXARGS) |
9 | { |
10 | if (curr->w_args[curr->w_NumArgs] < 100000000) |
11 | curr->w_args[curr->w_NumArgs] = |
12 | --- resize.c.orig 2003-09-08 10:26:31.000000000 -0400 |
13 | +++ resize.c 2003-11-29 10:41:50.000000000 -0500 |
14 | @@ -682,6 +682,17 @@ |
15 | if (wi == 0) |
16 | he = hi = 0; |
17 | |
18 | + if (wi > 1000) |
19 | + { |
20 | + Msg(0, "Window width too large, truncated"); |
21 | + wi = 1000; |
22 | + } |
23 | + if (he > 1000) |
24 | + { |
25 | + Msg(0, "Window height too large, truncated"); |
26 | + he = 1000; |
27 | + } |
28 | + |
29 | if (p->w_width == wi && p->w_height == he && p->w_histheight == hi) |
30 | { |
31 | debug("ChangeWindowSize: No change.\n"); |