]> git.nihav.org Git - nihav.git/commitdiff
indeo: fix tile end calculation
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 7 Oct 2022 16:09:08 +0000 (18:09 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 7 Oct 2022 12:45:46 +0000 (14:45 +0200)
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));
                 {