[MPlayer-cvslog] r37573 - trunk/libmpcodecs/ad_msadpcm.c

cehoyos subversion at mplayerhq.hu
Tue Dec 29 19:37:46 CET 2015


Author: cehoyos
Date: Tue Dec 29 19:37:46 2015
New Revision: 37573

Log:
libmpcodecs/ad_msadpcm: Fix a division by zero.

Fixes a crash with a file reported by Gustavo Grieco:
SIGFPE.PC.5555557249c3.STACK.18b325c3c0.CODE.1.ADDR.0x5555557249c3.INSTR.divl___0x80\(%rsi\).fuzz

Modified:
   trunk/libmpcodecs/ad_msadpcm.c

Modified: trunk/libmpcodecs/ad_msadpcm.c
==============================================================================
--- trunk/libmpcodecs/ad_msadpcm.c	Tue Dec 29 19:34:03 2015	(r37572)
+++ trunk/libmpcodecs/ad_msadpcm.c	Tue Dec 29 19:37:46 2015	(r37573)
@@ -80,6 +80,8 @@ static int preinit(sh_audio_t *sh_audio)
   sh_audio->audio_out_minsize = sh_audio->wf->nBlockAlign * 4;
   sh_audio->ds->ss_div =
     (sh_audio->wf->nBlockAlign - MS_ADPCM_PREAMBLE_SIZE) * 2;
+  if (!sh_audio->ds->ss_div)
+    return 0;
   sh_audio->audio_in_minsize =
   sh_audio->ds->ss_mul = sh_audio->wf->nBlockAlign;
   return 1;


More information about the MPlayer-cvslog mailing list