vlc/vlc-3.0 | branch: master | Francois Cartegnie <[email protected]> | Tue Feb 
26 22:14:04 2019 +0100| [5404b5e34da45eb5863b69d22891d5257402ad8e] | committer: 
Hugo Beauzée-Luyssen

demux: ogg: fix read overflow

(cherry picked from commit 289041f41a1d7d62da589ed01b1fa832fb68e7fa)
Signed-off-by: Hugo Beauzée-Luyssen <[email protected]>

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

 modules/demux/ogg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index f0027b197e..e018d21058 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -3146,6 +3146,8 @@ static void Ogg_ReadAnnodexHeader( demux_t *p_demux,
 static void Ogg_ReadSkeletonHeader( demux_t *p_demux, logical_stream_t 
*p_stream,
                                     ogg_packet *p_oggpacket )
 {
+    if( p_oggpacket->bytes < 12 )
+        return;
     p_demux->p_sys->p_skelstream = p_stream;
     /* There can be only 1 skeleton for streams */
     p_demux->p_sys->skeleton.major = GetWLE( &p_oggpacket->packet[8] );

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to