Mesa (mesa_7_7_branch): progs/demos: Check upper bounds of input in manywin .c.

Vinson Lee vlee at kemper.freedesktop.org
Sun Jan 10 09:57:51 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 199dedd6dd06e7f647dc6741611c06954aca3c77
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=199dedd6dd06e7f647dc6741611c06954aca3c77

Author: Vinson Lee <vlee at vmware.com>
Date:   Sun Jan 10 01:57:13 2010 -0800

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

---

 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 3b0810b..8ad5c4f 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++) {




More information about the mesa-commit mailing list