[vlc-commits] live555: Fix potential null dereference

Hugo Beauzée-Luyssen git at videolan.org
Thu May 31 10:06:00 CEST 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu May 31 09:59:28 2018 +0200| [1aaf923f49ae45323f8eef8d064a5fed1d3699e7] | committer: Hugo Beauzée-Luyssen

live555: Fix potential null dereference

Fix CD 4ad6cf87-d686-4199-bc1c-ba9c4b62ad77

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

 modules/access/live555.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index 6019eecbb7..55e9505ebd 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -1286,6 +1286,8 @@ static int Play( demux_t *p_demux )
  *****************************************************************************/
 static bool HasSharedSession( MediaSubsession *session )
 {
+    if( session->sessionId() == NULL )
+        return false;
     MediaSubsessionIterator *it =
             new MediaSubsessionIterator( session->parentSession() );
     MediaSubsession *subsession;
@@ -1294,7 +1296,8 @@ static bool HasSharedSession( MediaSubsession *session )
     {
         if( session == subsession )
             continue;
-        if( !strcmp( session->sessionId(), subsession->sessionId() ) )
+        if( subsession->sessionId() != NULL &&
+            !strcmp( session->sessionId(), subsession->sessionId() ) )
         {
             b_shared = true;
             break;



More information about the vlc-commits mailing list