[MPlayer-cvslog] r37585 - trunk/libmpdemux/demux_gif.c

rtogni subversion at mplayerhq.hu
Mon Jan 4 19:29:06 CET 2016


Author: rtogni
Date: Mon Jan  4 19:29:06 2016
New Revision: 37585

Log:
demux_gif: do not crash on missing colormap.

Fixes a crash with a fuzzed file reported by Gustavo Grieco:
SIGSEGV.PC.5555557f7cf2.STACK.d7c589751.CODE.1.ADDR.\(nil\).INSTR.cmpl___\$0x100,\(%rsi\).fuzz

Modified:
   trunk/libmpdemux/demux_gif.c

Modified: trunk/libmpdemux/demux_gif.c
==============================================================================
--- trunk/libmpdemux/demux_gif.c	Mon Jan  4 18:28:10 2016	(r37584)
+++ trunk/libmpdemux/demux_gif.c	Mon Jan  4 19:29:06 2016	(r37585)
@@ -204,6 +204,11 @@ static int demux_gif_fill_buffer(demuxer
 
   effective_map = gif->Image.ColorMap;
   if (effective_map == NULL) effective_map = gif->SColorMap;
+  if (effective_map == NULL) {
+    mp_msg(MSGT_DEMUX, MSGL_ERR, "[demux_gif] No local nor global colormap.\n");
+    free(buf);
+    return 0;
+  }
 
   {
     int y;


More information about the MPlayer-cvslog mailing list