- Added coordinate range checking to DCanvas::ParseDrawTextureTags() to avoid
potential crashes in the situation that con_scaletext is 2 and somebody uses a hud message as if a hud size was specified, but forgot to actually set the hud size. SVN r1010 (trunk)
This commit is contained in:
parent
4850a98c13
commit
ff43b7e913
2 changed files with 10 additions and 0 deletions
|
|
@ -298,6 +298,12 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l
|
|||
return false;
|
||||
}
|
||||
|
||||
// Do some sanity checks on the coordinates.
|
||||
if (x < -16383 || x > 16383 || y < -16383 || y > 16383)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtBottom = false;
|
||||
|
||||
parms->texwidth = img->GetScaledWidth();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue