summaryrefslogtreecommitdiffstats
path: root/progs/xdemos/manywin.c
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-01-10 01:57:13 -0800
committerVinson Lee <[email protected]>2010-01-10 01:57:13 -0800
commit199dedd6dd06e7f647dc6741611c06954aca3c77 (patch)
treefd67f0e7c32d8f0f9942da687fc63f979b9aba9e /progs/xdemos/manywin.c
parent0c7814fe238fe0e2bbeff448c32f79146f9ae923 (diff)
progs/demos: Check upper bounds of input in manywin.c.
Diffstat (limited to 'progs/xdemos/manywin.c')
-rw-r--r--progs/xdemos/manywin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/progs/xdemos/manywin.c b/progs/xdemos/manywin.c
index 3b0810b2e54..8ad5c4fe49f 100644
--- a/progs/xdemos/manywin.c
+++ b/progs/xdemos/manywin.c
@@ -400,6 +400,8 @@ main(int argc, char *argv[])
}
if (n < 1)
n = 1;
+ if (n > MAX_HEADS)
+ n = MAX_HEADS;
printf("%d windows\n", n);
for (i = 0; i < n; i++) {