summaryrefslogtreecommitdiff
path: root/src/resize.c
diff options
context:
space:
mode:
authorjnweiger <jnweiger>2005-12-16 18:58:24 +0000
committerjnweiger <jnweiger>2005-12-16 18:58:24 +0000
commit75b909204c353b772a978afcc7d170aca5636296 (patch)
treec3c0dd1329752571c1926be1aba07eb24253bf96 /src/resize.c
parent44c5ed24c49b4e78abdf5192abed85885eefce68 (diff)
downloadscreen-75b909204c353b772a978afcc7d170aca5636296.tar.gz
Security Bugfix
http://www.securityfocus.com/archive/1/345844/2003-11-24/2003-11-30/0
Diffstat (limited to 'src/resize.c')
-rw-r--r--src/resize.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/resize.c b/src/resize.c
index 6b5cef4..cae0f71 100644
--- a/src/resize.c
+++ b/src/resize.c
@@ -682,6 +682,17 @@ int wi, he, hi;
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");