mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
fix out of boundary when strcpy (#1173)
* fix out of boundary when strcpy, fix #1170 * fix format check failure * fix format check error
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user