[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 2021-08-10 09:41:56 +10:00
parent e707f9d933
commit 230ce81eb8

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;