[MPlayer-cvslog] r37695 - trunk/stream/freesdp/parser.c

reimar subversion at mplayerhq.hu
Fri Feb 12 21:44:49 CET 2016


Author: reimar
Date: Fri Feb 12 21:44:49 2016
New Revision: 37695

Log:
freesdp/parser.c: break loop if no more strings found.

Avoids null dereference.
Fixes Coverity issue.

Modified:
   trunk/stream/freesdp/parser.c

Modified: trunk/stream/freesdp/parser.c
==============================================================================
--- trunk/stream/freesdp/parser.c	Fri Feb 12 21:23:39 2016	(r37694)
+++ trunk/stream/freesdp/parser.c	Fri Feb 12 21:44:49 2016	(r37695)
@@ -332,8 +332,8 @@ fsdp_parse (const char *text_description
                                             &(repeat->
                                               offsets[k]));
                 i = strchr (i, ' ');
-                if (NULL != i)
-                  i++;
+                if (!i) break;
+                i++;
               }
               if (k < repeat->offsets_count)
               {


More information about the MPlayer-cvslog mailing list