[MPlayer-cvslog] r37584 - trunk/libmpcodecs/ad_imaadpcm.c
rtogni
subversion at mplayerhq.hu
Mon Jan 4 18:28:10 CET 2016
Author: rtogni
Date: Mon Jan 4 18:28:10 2016
New Revision: 37584
Log:
ad_imaadpcm: MS/QT IMA ADCPM and DK4 ADPCM can have only 1 or 2 channels
Fixes a crash with a fuzzed file reported by Gustavo Grieco:
SIGSEGV.PC.55555572483b.STACK.23c6bd043.CODE.2.ADDR.0x7ffff7e40000.INSTR.mov____%si,-0x4\(%r8\).fuzz
Modified:
trunk/libmpcodecs/ad_imaadpcm.c
Modified: trunk/libmpcodecs/ad_imaadpcm.c
==============================================================================
--- trunk/libmpcodecs/ad_imaadpcm.c Mon Jan 4 17:16:08 2016 (r37583)
+++ trunk/libmpcodecs/ad_imaadpcm.c Mon Jan 4 18:28:10 2016 (r37584)
@@ -92,6 +92,10 @@ static int preinit(sh_audio_t *sh_audio)
// not exactly sure what this field is for
sh_audio->audio_out_minsize = 8192;
+ // These formats can have only 1 or 2 channels
+ if (sh_audio->wf->nChannels != 1 && sh_audio->wf->nChannels != 2)
+ return 0;
+
// if format is "ima4", assume the audio is coming from a QT file which
// indicates constant block size, whereas an AVI/ASF/WAV file will fill
// in this field with 0x11
More information about the MPlayer-cvslog
mailing list