diff options
author | Eugene Sandulenko | 2016-05-31 13:25:38 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-31 17:12:18 +0200 |
commit | 3b5236c9dee1a14c231b5622582eb9bc87b897a3 (patch) | |
tree | f320d5ed04f388b4b2da867686c3757fb6acbe57 | |
parent | 1a084f1541b0c733a1a36d8a77772abaec4f3d40 (diff) | |
download | scummvm-rg350-3b5236c9dee1a14c231b5622582eb9bc87b897a3.tar.gz scummvm-rg350-3b5236c9dee1a14c231b5622582eb9bc87b897a3.tar.bz2 scummvm-rg350-3b5236c9dee1a14c231b5622582eb9bc87b897a3.zip |
IMAGE: Init memory before usage
-rw-r--r-- | image/pict.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/image/pict.cpp b/image/pict.cpp index 89f115dc90..4f4f0396bf 100644 --- a/image/pict.cpp +++ b/image/pict.cpp @@ -340,6 +340,8 @@ void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool withPa uint32 lineSize = MAX<int>(width * bytesPerPixel + (8 * 2 / packBitsData.pixMap.pixelSize), packBitsData.pixMap.rowBytes); byte *buffer = new byte[lineSize * height]; + memset(buffer, 0, lineSize * height); + // Read in amount of data per row for (uint16 i = 0; i < packBitsData.pixMap.bounds.height(); i++) { // NOTE: Compression 0 is "default". The format in SCI games is packed when 0. |