[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:20:48 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 11 11:40:14 2019 +0100| [ad0f99cfdef104f5af7701d5e1d0f9db39818752] | 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>

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

 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 2d28808ff4..ae888251a8 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -2054,7 +2054,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