[MPlayer-cvslog] r37572 - trunk/libmpcodecs/ad_dk3adpcm.c

cehoyos subversion at mplayerhq.hu
Tue Dec 29 19:34:03 CET 2015


Author: cehoyos
Date: Tue Dec 29 19:34:03 2015
New Revision: 37572

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

Fixes a crash with a file reported by Gustavo Grieco:
SIGFPE.PC.555555722c1d.STACK.18b325c3c0.CODE.1.ADDR.0x555555722c1d.INSTR.divl___0x80\(%rcx\).fuzz

Modified:
   trunk/libmpcodecs/ad_dk3adpcm.c

Modified: trunk/libmpcodecs/ad_dk3adpcm.c
==============================================================================
--- trunk/libmpcodecs/ad_dk3adpcm.c	Tue Dec 29 19:21:40 2015	(r37571)
+++ trunk/libmpcodecs/ad_dk3adpcm.c	Tue Dec 29 19:34:03 2015	(r37572)
@@ -88,6 +88,8 @@ static int preinit(sh_audio_t *sh_audio)
   sh_audio->audio_out_minsize = sh_audio->wf->nBlockAlign * 6;
   sh_audio->ds->ss_div =
     (sh_audio->wf->nBlockAlign - DK3_ADPCM_PREAMBLE_SIZE) * 8 / 3;
+  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