[client] egl: allocate space for the initial texture dimensions

This fixes a buffer overrun when writing to the dimensions array
This commit is contained in:
Geoffrey McRae committed 2021-08-10 09:41:56 +10:00
1 parent e707f9d933
commit 230ce81eb8
1 file changed
+1 -1
+1 -1
View File
@@ -294,7 +294,7 @@ enum EGL_TexStatus egl_textureBind(EGL_Texture * this)
free(this->bindData);
BindData * bd = (BindData *)calloc(1, sizeof(struct BindData) +
sizeof(bd->dimensions[0]) * ll_count(this->render) * 2);
sizeof(bd->dimensions[0]) * (ll_count(this->render)+1) * 2);
bd->sampler = this->sampler;
this->bindData = bd;