From: Kostya Shishkov Date: Wed, 15 Apr 2020 09:51:21 +0000 (+0200) Subject: vmd: raise unpacked buffer size to a factor four X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=ed6c9f8a7b4c723b02361bf75fdccdc40eb427cc;p=nihav.git vmd: raise unpacked buffer size to a factor four --- diff --git a/nihav-game/src/codecs/vmd.rs b/nihav-game/src/codecs/vmd.rs index 41bfad9..b81b4f5 100644 --- a/nihav-game/src/codecs/vmd.rs +++ b/nihav-game/src/codecs/vmd.rs @@ -236,7 +236,7 @@ impl NADecoder for VMDVideoDecoder { if let Some(ref edata) = info.get_extradata() { validate!(edata.len() == 0x330); let unp_size = read_u32le(&edata[800..])? as usize; - validate!(unp_size < self.width * self.height * 3 + 64); // just for sanity + validate!(unp_size < self.width * self.height * 4 + 64); // just for sanity self.buf.resize(unp_size, 0); for i in 0..768 { let el = edata[28 + i];