mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- validate the buffer size in HWViewpointBuffer::Set2D.
This was causing crashes in Dragon Sector when writing past the buffer's end.
This commit is contained in:
parent
70d355cfa3
commit
ec04a95929
1 changed files with 1 additions and 0 deletions
|
@ -96,6 +96,7 @@ void HWViewpointBuffer::Set2D(FRenderState &di, int width, int height, int pll)
|
|||
matrices.mProjectionMatrix.ortho(0, (float)width, (float)height, 0, -1.0f, 1.0f);
|
||||
matrices.CalcDependencies();
|
||||
|
||||
CheckSize();
|
||||
mBuffer->Map();
|
||||
memcpy(((char*)mBuffer->Memory()) + mUploadIndex * mBlockAlign, &matrices, sizeof(matrices));
|
||||
mBuffer->Unmap();
|
||||
|
|
Loading…
Reference in a new issue