aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_glview_manygears.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-06-07 14:05:41 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-06-07 14:05:41 +0900
commit5b976e28052ddf2ad08f7d33c78f25d57a127d30 (patch)
tree6fa030b06650afa8a1d99522d381cd7b2d280775 /src/bin/elementary/test_glview_manygears.c
parentgl_x11: Working GLES2 fallback. (diff)
downloadefl-5b976e28052ddf2ad08f7d33c78f25d57a127d30.tar.gz
elm_test: Fix potential crash and garbage printf
Diffstat (limited to 'src/bin/elementary/test_glview_manygears.c')
-rw-r--r--src/bin/elementary/test_glview_manygears.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/elementary/test_glview_manygears.c b/src/bin/elementary/test_glview_manygears.c
index 34627a510f..ea8740931e 100644
--- a/src/bin/elementary/test_glview_manygears.c
+++ b/src/bin/elementary/test_glview_manygears.c
@@ -606,7 +606,7 @@ gears_init(GLData *gld)
Evas_GL_API *gl = gld->glapi;
const char *p;
- char msg[512];
+ char msg[512] = {};
gl->glEnable(GL_CULL_FACE);
gl->glEnable(GL_DEPTH_TEST);
@@ -616,14 +616,14 @@ gears_init(GLData *gld)
gl->glShaderSource(gld->vtx_shader, 1, &p, NULL);
gl->glCompileShader(gld->vtx_shader);
gl->glGetShaderInfoLog(gld->vtx_shader, sizeof msg, NULL, msg);
- printf("vertex shader info: %s\n", msg);
+ printf("vertex shader info: %512s\n", msg);
p = fragment_shader;
gld->fgmt_shader = gl->glCreateShader(GL_FRAGMENT_SHADER);
gl->glShaderSource(gld->fgmt_shader, 1, &p, NULL);
gl->glCompileShader(gld->fgmt_shader);
gl->glGetShaderInfoLog(gld->fgmt_shader, sizeof msg, NULL, msg);
- printf("fragment shader info: %s\n", msg);
+ printf("fragment shader info: %512s\n", msg);
gld->program = gl->glCreateProgram();
gl->glAttachShader(gld->program, gld->vtx_shader);
@@ -633,7 +633,7 @@ gears_init(GLData *gld)
gl->glLinkProgram(gld->program);
gl->glGetProgramInfoLog(gld->program, sizeof msg, NULL, msg);
- printf("info: %s\n", msg);
+ printf("info: %512s\n", msg);
gl->glUseProgram(gld->program);
gld->mvp_loc = gl->glGetUniformLocation(gld->program, "mvp");