summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_texture.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-12 17:32:04 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-12 17:32:04 +0900
commita97f5d7bb8152df6cbc8ad193c57ff92e58798ba (patch)
tree4c3795aa81485153853e66f66eb058cce8375ec2 /src/modules/evas/engines/gl_common/evas_gl_texture.c
parent8845ecb2b2bca5c0db018a89630bd256dc5eef3e (diff)
evas gl common - fix possible negative array accesses if search format fails
this should fix CID 1223506, 1223505, 1223504
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index ec1255c275..3ce910052a 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -955,6 +955,7 @@ evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, un
955 if (!tex) return NULL; 955 if (!tex) return NULL;
956 956
957 lformat = _evas_gl_texture_search_format(alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888); 957 lformat = _evas_gl_texture_search_format(alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888);
958 if (lformat < 0) return NULL;
958 tex->pt = _pool_tex_native_new(gc, w, h, 959 tex->pt = _pool_tex_native_new(gc, w, h,
959 *matching_format[lformat].intformat, 960 *matching_format[lformat].intformat,
960 *matching_format[lformat].format, 961 *matching_format[lformat].format,
@@ -978,6 +979,7 @@ evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, un
978 if (!tex) return NULL; 979 if (!tex) return NULL;
979 980
980 lformat = _evas_gl_texture_search_format(alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888); 981 lformat = _evas_gl_texture_search_format(alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888);
982 if (lformat < 0) return NULL;
981 tex->pt = _pool_tex_render_new(gc, w, h, 983 tex->pt = _pool_tex_render_new(gc, w, h,
982 *matching_format[lformat].intformat, 984 *matching_format[lformat].intformat,
983 *matching_format[lformat].format); 985 *matching_format[lformat].format);
@@ -1000,7 +1002,7 @@ evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im
1000 if (!tex) return NULL; 1002 if (!tex) return NULL;
1001 1003
1002 lformat = _evas_gl_texture_search_format(tex->alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888); 1004 lformat = _evas_gl_texture_search_format(tex->alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888);
1003 1005 if (lformat < 0) return NULL;
1004 tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, 1006 tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h,
1005 *matching_format[lformat].intformat, 1007 *matching_format[lformat].intformat,
1006 *matching_format[lformat].format); 1008 *matching_format[lformat].format);