[vlc-commits] Fixed a possible NULL dereference in the GME demuxer.

Laurent Aimar git at videolan.org
Sat Jan 7 01:26:39 CET 2012


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Jan  7 01:25:36 2012 +0100| [ffc31b5c43de67733ee90b3ea07409a7d81733d0] | committer: Laurent Aimar

Fixed a possible NULL dereference in the GME demuxer.

It was added by [5e0e7978ffa0ad34c780c08caf518efcc4082127].

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ffc31b5c43de67733ee90b3ea07409a7d81733d0
---

 modules/demux/gme.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/demux/gme.c b/modules/demux/gme.c
index 64f04e0..464ba9e 100644
--- a/modules/demux/gme.c
+++ b/modules/demux/gme.c
@@ -105,10 +105,14 @@ static int Open (vlc_object_t *obj)
         return VLC_ENOMEM;
     }
     if (data)
+    {
         gme_load_custom (sys->emu, ReaderBlock, data->i_buffer, data);
+        block_Release(data);
+    }
     else
+    {
         gme_load_custom (sys->emu, ReaderStream, size, demux->s);
-    block_Release(data);
+    }
     gme_start_track (sys->emu, sys->track_id = 0);
 
     es_format_t fmt;



More information about the vlc-commits mailing list