From a67e8a61dcb367e787aaee39d24caba30f451704 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sat, 20 Feb 2016 22:29:15 +0100 Subject: VIDEO: Add warning for potential unaligned writes --- image/codecs/indeo3.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'image/codecs') diff --git a/image/codecs/indeo3.cpp b/image/codecs/indeo3.cpp index d414de31d1..560658d1f5 100644 --- a/image/codecs/indeo3.cpp +++ b/image/codecs/indeo3.cpp @@ -391,6 +391,11 @@ void Indeo3Decoder::decodeChunk(byte *cur, byte *ref, int width, int height, int rle_v1, rle_v2, rle_v3; uint16 res; + if ((width & 3) != 0) { + // This isn't a valid width according to http://wiki.multimedia.cx/index.php?title=Indeo_3 + warning("Indeo3 file with width not divisible by 4. This will cause unaligned writes"); + } + bit_buf = 0; ref_vectors = NULL; -- cgit v1.2.3