aboutsummaryrefslogtreecommitdiff
path: root/graphics/video
diff options
context:
space:
mode:
authorSven Hesse2009-07-25 18:44:24 +0000
committerSven Hesse2009-07-25 18:44:24 +0000
commit32d74a224735b56f8e28e3bff63f330c33ad25dd (patch)
treec90e5bcda6ad02cc15dc55b62ca845b2537f380f /graphics/video
parent8d9e3de37ca30b0b4db36fe35348ea132ac4d010 (diff)
downloadscummvm-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.cpp4
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;