aboutsummaryrefslogtreecommitdiff
path: root/video/codecs
diff options
context:
space:
mode:
authorD G Turner2012-04-05 12:50:36 +0100
committerD G Turner2012-04-08 03:29:29 +0100
commit7109e26d04a90b718ad2ed635e0aeb35b011abd7 (patch)
treee58b8f76c64d3fc15d29c6ee2b125cc065a1b9e1 /video/codecs
parentd15ff5a03ed098ba50303f06ad4e96147a43517a (diff)
downloadscummvm-rg350-7109e26d04a90b718ad2ed635e0aeb35b011abd7.tar.gz
scummvm-rg350-7109e26d04a90b718ad2ed635e0aeb35b011abd7.tar.bz2
scummvm-rg350-7109e26d04a90b718ad2ed635e0aeb35b011abd7.zip
VIDEO: Workaround for out of buffer accesses in SVQ1 codec.
This is a temporary workaround during development. Keyframe (I) decoding is now working correctly, but Deltaframe (P) is still giving corrupted output...
Diffstat (limited to 'video/codecs')
-rw-r--r--video/codecs/svq1.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/video/codecs/svq1.cpp b/video/codecs/svq1.cpp
index 5ef45c25a1..f19625bf64 100644
--- a/video/codecs/svq1.cpp
+++ b/video/codecs/svq1.cpp
@@ -283,9 +283,11 @@ const Graphics::Surface *SVQ1Decoder::decodeImage(Common::SeekableReadStream *st
}
byte *current[3];
- current[0] = new byte[_width*_height];
- current[1] = new byte[(_width/4)*(_height/4)];
- current[2] = new byte[(_width/4)*(_height/4)];
+ // FIXME - Added extra _width of 16px blocks to stop out of
+ // range access causing crashes. Need to correct code...
+ current[0] = new byte[_width*_height +(_width*16)];
+ current[1] = new byte[(_width/4)*(_height/4) +(_width/4*16)];
+ current[2] = new byte[(_width/4)*(_height/4) +(_width/4*16)];
// Decode Y, U and V component planes
for (int i = 0; i < 3; i++) {