aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-10-09 02:59:40 +0000
committerTravis Howell2006-10-09 02:59:40 +0000
commit20a0bc67004b556b5bbf82babdba0c24cf77dafb (patch)
treead100e24b634a508672185133788e757c2742e39
parentaac87e10c25c1fc4999fdd303a2e0b9e30d8d4b8 (diff)
downloadscummvm-rg350-20a0bc67004b556b5bbf82babdba0c24cf77dafb.tar.gz
scummvm-rg350-20a0bc67004b556b5bbf82babdba0c24cf77dafb.tar.bz2
scummvm-rg350-20a0bc67004b556b5bbf82babdba0c24cf77dafb.zip
Fix invalid reads during conversion
svn-id: r24246
-rw-r--r--engines/agos/res_ami.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/agos/res_ami.cpp b/engines/agos/res_ami.cpp
index e3a987d4e7..ecafd46264 100644
--- a/engines/agos/res_ami.cpp
+++ b/engines/agos/res_ami.cpp
@@ -83,8 +83,8 @@ static void convertcompressedclip(uint16 height, uint16 width) {
uint16 length, i, j, k, word1, word2, word3, word4, cliplength;
byte outbyte, outbyte1, x, y;
char n;
- uncbuffer = (byte *)malloc((int32)(height * width / 2));
- uncbfrout = (byte *)malloc((int32)(height * width / 2));
+ uncbuffer = (byte *)malloc(height * width * 2);
+ uncbfrout = (byte *)malloc(height * width * 2);
length = width / 16;
length *= height;
plane0 = READ_BE_UINT32(clipptr) + clipptr; clipptr += 4; plane0 += 4;