[Mesa-dev] [PATCH] mesa: add assert after calloc before access memory in attrib.c
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Wed Nov 27 06:53:32 PST 2013
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
src/mesa/main/attrib.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index c9332bd..5185f89 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1488,6 +1488,9 @@ init_array_attrib_data(struct gl_context *ctx,
{
/* Get a non driver gl_array_object. */
attrib->ArrayObj = CALLOC_STRUCT( gl_array_object );
+
+ assert(attrib->ArrayObj != NULL);
+
_mesa_initialize_array_object(ctx, attrib->ArrayObj, 0);
}
--
1.8.1.2
More information about the mesa-dev
mailing list