From ed6c9f8a7b4c723b02361bf75fdccdc40eb427cc Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Wed, 15 Apr 2020 11:51:21 +0200 Subject: [PATCH] vmd: raise unpacked buffer size to a factor four --- nihav-game/src/codecs/vmd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; -- 2.39.5