[MPlayer-cvslog] r37574 - trunk/libmpcodecs/ad_imaadpcm.c
cehoyos
subversion at mplayerhq.hu
Tue Dec 29 19:38:30 CET 2015
Author: cehoyos
Date: Tue Dec 29 19:38:30 2015
New Revision: 37574
Log:
libmpcodecs/ad_imaadpcm: Fix a division by zero.
Fixes a crash with a file reported by Gustavo Grieco:
SIGFPE.PC.5555557243ad.STACK.18b325c3c0.CODE.1.ADDR.0x5555557243ad.INSTR.divl___0x80\(%rcx\).fuzz
Modified:
trunk/libmpcodecs/ad_imaadpcm.c
Modified: trunk/libmpcodecs/ad_imaadpcm.c
==============================================================================
--- trunk/libmpcodecs/ad_imaadpcm.c Tue Dec 29 19:37:46 2015 (r37573)
+++ trunk/libmpcodecs/ad_imaadpcm.c Tue Dec 29 19:38:30 2015 (r37574)
@@ -100,6 +100,8 @@ static int preinit(sh_audio_t *sh_audio)
{
sh_audio->ds->ss_div = (sh_audio->wf->nBlockAlign -
(MS_IMA_ADPCM_PREAMBLE_SIZE * sh_audio->wf->nChannels)) * 2;
+ if (!sh_audio->ds->ss_div)
+ return 0;
sh_audio->ds->ss_mul = sh_audio->wf->nBlockAlign;
}
else
More information about the MPlayer-cvslog
mailing list