From: Vinson Lee Date: Sun, 10 Jan 2010 09:57:13 +0000 (-0800) Subject: progs/demos: Check upper bounds of input in manywin.c. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=199dedd6dd06e7f647dc6741611c06954aca3c77;p=mesa.git progs/demos: Check upper bounds of input in manywin.c. --- 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++) {