projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
998018d
)
glx: Check malloc return value before accessing memory in glx/clientattrib.c
author
Juha-Pekka Heikkila
<juhapekka.heikkila@gmail.com>
Mon, 2 Dec 2013 09:39:00 +0000
(
02:39
-0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 3 Dec 2013 21:35:41 +0000
(14:35 -0700)
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/glx/clientattrib.c
patch
|
blob
|
history
diff --git
a/src/glx/clientattrib.c
b/src/glx/clientattrib.c
index
1b306ea
..
37f14c5
100644
(file)
--- a/
src/glx/clientattrib.c
+++ b/
src/glx/clientattrib.c
@@
-76,6
+76,10
@@
__indirect_glPushClientAttrib(GLuint mask)
if (spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) {
if (!(sp = *spp)) {
sp = malloc(sizeof(__GLXattribute));
+ if (sp == NULL) {
+ __glXSetError(gc, GL_OUT_OF_MEMORY);
+ return;
+ }
*spp = sp;
}
sp->mask = mask;