projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a6acec
)
progs/util: Exit RawImageGetData early if malloc fails.
author
Vinson Lee
<vlee@vmware.com>
Fri, 20 Nov 2009 20:11:55 +0000
(12:11 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Fri, 4 Dec 2009 01:14:08 +0000
(17:14 -0800)
Prevents a null pointer deference later on.
(cherry picked from commit
e26135a744f740430e3dc341fa692544ba99c11e
)
progs/util/readtex.c
patch
|
blob
|
history
diff --git
a/progs/util/readtex.c
b/progs/util/readtex.c
index
1e1183c
..
81cb626
100644
(file)
--- a/
progs/util/readtex.c
+++ b/
progs/util/readtex.c
@@
-230,6
+230,7
@@
static void RawImageGetData(rawImageRec *raw, TK_RGBImageRec *final)
final->data = (unsigned char *)malloc((raw->sizeX+1)*(raw->sizeY+1)*4);
if (final->data == NULL) {
fprintf(stderr, "Out of memory!\n");
+ return;
}
ptr = final->data;