Browse Source

core: sdp - update start pointer only after len adjustment

- len is adjusted first by the amount of chars consumed so far
- start pointer is adjusted to start new search

(cherry picked from commit c9fbf6f46898dbb2a8413a1c9d824a56241f2288)
S-P Chan 4 months ago
parent
commit
9828b565e8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/parser/sdp/sdp_helpr_funcs.c

+ 1 - 1
src/core/parser/sdp/sdp_helpr_funcs.c

@@ -330,8 +330,8 @@ int extract_candidate(str *body, sdp_stream_cell_t *stream)
 
 	fl = space - start;
 
-	start = space + 1;
 	len = len - (space - start + 1);
+	start = space + 1;
 
 	space = memchr(start, 32, len);
 	if(space == NULL) {