From d42467687e9de756aa3e4bca5e55f69391af3065 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 6 Jan 2010 21:39:44 -0800 Subject: [PATCH] progs/demos: Assert that input to malloc is valid. --- progs/demos/fire.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/progs/demos/fire.c b/progs/demos/fire.c index dd70f6141db..f30b893dbf3 100644 --- a/progs/demos/fire.c +++ b/progs/demos/fire.c @@ -6,6 +6,7 @@ * Humanware s.r.l. */ +#include #include #include #include @@ -759,6 +760,7 @@ main(int ac, char **av) glFogfv(GL_FOG_COLOR, fogcolor); glFogf(GL_FOG_DENSITY, 0.1); + assert(np > 0); p = (part *) malloc(sizeof(part) * np); for (i = 0; i < np; i++) -- 2.30.2