diff --git a/test_conformance/gles/test_fence_sync.cpp b/test_conformance/gles/test_fence_sync.cpp index 75e9d358..0af91a46 100644 --- a/test_conformance/gles/test_fence_sync.cpp +++ b/test_conformance/gles/test_fence_sync.cpp @@ -160,7 +160,7 @@ GLuint createShaderProgram(GLint *posLoc, GLint *colLoc) glAttachShader(program, vpShader); GLuint fpShader; - char* fpstr = (char*)malloc(strlen(fragmentshader)); + char *fpstr = (char *)malloc(sizeof(fragmentshader)); strcpy(fpstr, fragmentshader); fpShader = glCreateShader(GL_FRAGMENT_SHADER); glShaderSource(fpShader, 1, (const GLchar **)&fpstr, NULL);