diff options
author | Sven Hesse | 2009-07-25 18:44:24 +0000 |
---|---|---|
committer | Sven Hesse | 2009-07-25 18:44:24 +0000 |
commit | 32d74a224735b56f8e28e3bff63f330c33ad25dd (patch) | |
tree | c90e5bcda6ad02cc15dc55b62ca845b2537f380f /graphics/video | |
parent | 8d9e3de37ca30b0b4db36fe35348ea132ac4d010 (diff) | |
download | scummvm-rg350-32d74a224735b56f8e28e3bff63f330c33ad25dd.tar.gz scummvm-rg350-32d74a224735b56f8e28e3bff63f330c33ad25dd.tar.bz2 scummvm-rg350-32d74a224735b56f8e28e3bff63f330c33ad25dd.zip |
Adding more sanity checks to Vmd::renderFrame()
svn-id: r42783
Diffstat (limited to 'graphics/video')
-rw-r--r-- | graphics/video/coktelvideo/coktelvideo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/video/coktelvideo/coktelvideo.cpp b/graphics/video/coktelvideo/coktelvideo.cpp index e811448af2..622d68d98e 100644 --- a/graphics/video/coktelvideo/coktelvideo.cpp +++ b/graphics/video/coktelvideo/coktelvideo.cpp @@ -1718,7 +1718,9 @@ uint32 Vmd::renderFrame(int16 &left, int16 &top, int16 &right, int16 &bottom) { byte *imdVidMem = _vidMem + sW * top + left; byte *srcPtr; - if ((width < 0) || (height < 0)) + if ((left < 0) || (top < 0) || (right < 0) || (bottom < 0)) + return 1; + if ((width <= 0) || (height <= 0)) return 1; uint8 type; |