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

Francois Cartegnie git at videolan.org
Tue Feb 26 20:10:02 CET 2019


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 25 09:28:04 2019 +0100| [11f0c9a207225066406b0426a4ee2df8c896cb84] | committer: Francois Cartegnie

demux: mp4: fix sgpd double free

(cherry picked from commit 68e5cdc500a550cb0b044ef95ac90d90364b8369)

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

 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 f069541f9a..e3ea40ce03 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -2321,8 +2321,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