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

reimar subversion at mplayerhq.hu
Fri Feb 12 21:47:50 CET 2016


Author: reimar
Date: Fri Feb 12 21:47:50 2016
New Revision: 37696

Log:
freesdp/parser.c: Fix null check in previous commit.

k still needs to be incremented if i becomes
NULL.

Modified:
   trunk/stream/freesdp/parser.c

Modified: trunk/stream/freesdp/parser.c
==============================================================================
--- trunk/stream/freesdp/parser.c	Fri Feb 12 21:44:49 2016	(r37695)
+++ trunk/stream/freesdp/parser.c	Fri Feb 12 21:47:50 2016	(r37696)
@@ -325,15 +325,15 @@ fsdp_parse (const char *text_description
               i = longfsdp_buf;
               for (k = 0;
                    (k < repeat->offsets_count)
-                     && (result == FSDPE_OK); k++)
+                     && (result == FSDPE_OK) && i; k++)
               {
                 result =
                   fsdp_repeat_time_to_uint (i,
                                             &(repeat->
                                               offsets[k]));
                 i = strchr (i, ' ');
-                if (!i) break;
-                i++;
+                if (NULL != i)
+                  i++;
               }
               if (k < repeat->offsets_count)
               {


More information about the MPlayer-cvslog mailing list