From 199dedd6dd06e7f647dc6741611c06954aca3c77 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 10 Jan 2010 01:57:13 -0800 Subject: [PATCH] progs/demos: Check upper bounds of input in manywin.c. --- progs/xdemos/manywin.c | 2 ++ 1 file changed, 2 insertions(+) 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++) { -- 2.30.2