From 74b68b0f3b64096bc4b48a4eacf5204b85b508e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Tue, 6 Mar 2018 16:32:16 +0100 Subject: [PATCH] voc: Reject blocks with a 0 samplerate --- modules/demux/voc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/demux/voc.c b/modules/demux/voc.c index f5bcd52e02..33e6ecf958 100644 --- a/modules/demux/voc.c +++ b/modules/demux/voc.c @@ -352,6 +352,8 @@ static int ReadBlockHeader( demux_t *p_demux ) goto corrupt; new_fmt.audio.i_rate = GetDWLE( buf ); + if( !new_fmt.audio.i_rate ) + goto corrupt; new_fmt.audio.i_bitspersample = buf[4]; new_fmt.audio.i_channels = buf[5]; -- 2.11.4.GIT