[vlc-commits] demux: ogg: fix read overflow

Francois Cartegnie git at videolan.org
Thu May 23 17:40:08 CEST 2019


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | 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 <hugo at beauzee.fr>

> 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] );



More information about the vlc-commits mailing list