Re: [Mesa-dev] [PATCH] mesa: add assert after calloc before access memory in attrib.c

2013-11-27 Thread Ian Romanick
Adding assertions won't fix the errors found by the static analysis tool because they don't exist in release builds. The technical correct way to deal with memory allocation failures in GL is to generate GL_OUT_OF_MEMORY and return. On 11/27/2013 06:53 AM, Juha-Pekka Heikkila wrote: > Signed-off-

[Mesa-dev] [PATCH] mesa: add assert after calloc before access memory in attrib.c

2013-11-27 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila --- 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