mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[client] egl: fix buffer overflow
This commit is contained in:
parent
e067db7bb4
commit
0ee5751b3a
@ -226,7 +226,7 @@ bool egl_shaderCompile(EGL_Shader * this, const char * vertex_code,
|
||||
}
|
||||
|
||||
const int diff = (strlen(replace) - strlen(search)) * instances;
|
||||
char * newCode = malloc(fragment_size + diff);
|
||||
char * newCode = malloc(fragment_size + diff + 1);
|
||||
if (!newCode)
|
||||
{
|
||||
DEBUG_ERROR("Out of memory");
|
||||
|
Loading…
Reference in New Issue
Block a user