diff options
author | Vinson Lee <vlee@vmware.com> | 2010-01-10 01:57:13 -0800 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2010-01-10 01:57:13 -0800 |
commit | 199dedd6dd06e7f647dc6741611c06954aca3c77 (patch) | |
tree | fd67f0e7c32d8f0f9942da687fc63f979b9aba9e /progs | |
parent | 0c7814fe238fe0e2bbeff448c32f79146f9ae923 (diff) |
progs/demos: Check upper bounds of input in manywin.c.
Diffstat (limited to 'progs')
-rw-r--r-- | progs/xdemos/manywin.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/progs/xdemos/manywin.c b/progs/xdemos/manywin.c index 3b0810b2e5..8ad5c4fe49 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++) { |