[vlc-commits] asx: Reject MRL bigger than 32K

Hugo Beauzée-Luyssen git at videolan.org
Fri Jul 21 12:18:31 CEST 2017


vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Jul 21 12:15:05 2017 +0200| [36956d45879eac9ead6a8d03a2b3df18d2e2b340] | committer: Hugo Beauzée-Luyssen

asx: Reject MRL bigger than 32K

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

 modules/demux/playlist/asx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/playlist/asx.c b/modules/demux/playlist/asx.c
index 30bea38136..7261a79f7b 100644
--- a/modules/demux/playlist/asx.c
+++ b/modules/demux/playlist/asx.c
@@ -469,7 +469,7 @@ static int Demux( demux_t *p_demux )
                         if( ( psz_parse = strcasestr( psz_parse, "\"" ) ) )
                         {
                             i_strlen = psz_parse-psz_backup;
-                            if( i_strlen < 1 ) continue;
+                            if( i_strlen < 1 || i_strlen > 32768 ) continue;
                             psz_string = xmalloc( i_strlen +1);
                             memcpy( psz_string, psz_backup, i_strlen );
                             psz_string[i_strlen] = '\0';
@@ -631,7 +631,7 @@ static int Demux( demux_t *p_demux )
                         {
                             char *psz_tmp;
                             i_strlen = psz_parse-psz_backup;
-                            if( i_strlen < 1 ) continue;
+                            if( i_strlen < 1 || i_strlen > 32768 ) continue;
 
                             if( psz_href )
                             {



More information about the vlc-commits mailing list