[vlc-commits] demux: matroska: don't use the RealAudio extra data if they cannot be casted

Steve Lhomme git at videolan.org
Thu May 23 17:40:17 CEST 2019


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 11 11:40:14 2019 +0100| [d537d3c7c8b322c5ae71eeb239672cde4aac9fe1] | committer: Hugo Beauzée-Luyssen

demux: matroska: don't use the RealAudio extra data if they cannot be casted

In all cases we use priv->sub_packet_size which if much further than the first
28 bytes.

https://hackerone.com/reports/492886

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
(cherry picked from commit ad0f99cfdef104f5af7701d5e1d0f9db39818752)
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=d537d3c7c8b322c5ae71eeb239672cde4aac9fe1
---

 modules/demux/mkv/matroska_segment_parse.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 5b8b1a78d9..154528ab6f 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1893,7 +1893,7 @@ bool matroska_segment_c::TrackInit( mkv_track_t * p_tk )
         static bool A_REAL__is_valid (HandlerPayload& vars) {
             uint8_t *p = vars.p_tk->p_extra_data;
 
-            if (vars.p_tk->i_extra_data <= 28)
+            if (vars.p_tk->i_extra_data <= sizeof(real_audio_private))
                 return false;
 
             if( memcmp( p, ".ra", 3 ) ) {



More information about the vlc-commits mailing list