progs/demos: Check upper bounds of input in manywin.c.

This commit is contained in:
Vinson Lee 2010-01-10 01:57:13 -08:00
parent 0c7814fe23
commit 199dedd6dd
1 changed files with 2 additions and 0 deletions

View File

@ -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++) {