[vlc-commits] demux: mp4: fix sgpd double free

Francois Cartegnie git at videolan.org
Tue Feb 26 18:57:17 CET 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 25 09:28:04 2019 +0100| [68e5cdc500a550cb0b044ef95ac90d90364b8369] | committer: Francois Cartegnie

demux: mp4: fix sgpd double free

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

 modules/demux/mp4/libmp4.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 63e1eb9547..50cc669784 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -2258,8 +2258,9 @@ static int MP4_ReadBox_sgpd( stream_t *p_stream, MP4_Box_t *p_box )
                 {
                     if( i_read < 1 )
                     {
+                        free( p_sgpd->p_entries );
                         p_sgpd->i_entry_count = 0;
-                        MP4_FreeBox_sgpd( p_box );
+                        p_sgpd->p_entries = NULL;
                         MP4_READBOX_EXIT( 0 );
                     }
                     uint8_t i_data;



More information about the vlc-commits mailing list