فهرست منبع

core: parser/sdp - check if still before end of the value

(cherry picked from commit b96bc11a54f11ec688429c057bf5a90c40c147b3)
Daniel-Constantin Mierla 7 ماه پیش
والد
کامیت
76ffc6d3d4
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/core/parser/sdp/sdp_helpr_funcs.c

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

@@ -413,7 +413,7 @@ int extract_ice_option(str *body, sdp_stream_cell_t *stream)
 		trim_len(ice_opt->option.len, ice_opt->option.s, ice_opt->option);
 
 		length = 0;
-		if(*ptr_src == 32)
+		if(ptr_src < end && *ptr_src == 32)
 			ptr_src++; /* skip space */
 	}