indeo: fix tile end calculation
[nihav.git] / nihav-indeo / src / codecs / ivibr.rs
index d501953225066ebb320513d0231aaaec7487d8b7..72a9480ec6c81de6281f33ca01948f5fc67e64ac 100644 (file)
@@ -601,7 +601,7 @@ impl IVIDecoder {
                 }
                 br.align();
                 validate!(len > 0);
-                let tile_end = tile_start + len * 8;
+                let tile_end = (tile_start & !7) + len * 8;
                 validate!(tile_end > br.tell());
                 validate!(tile_end <= br.tell() + (br.left() as usize));
                 {