Procházet zdrojové kódy

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
S-P Chan před 4 měsíci
rodič
revize
c9fbf6f468
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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) {