Przeglądaj źródła

core: sdp - check if space is found for extracting session version

(cherry picked from commit cdcb570e46101703f4963863c705345c7a3420ac)
Daniel-Constantin Mierla 3 miesięcy temu
rodzic
commit
91182d61d5
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/core/parser/sdp/sdp_helpr_funcs.c

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

@@ -734,7 +734,7 @@ int extract_sess_version(str *oline, str *sess_version)
 		i++;
 	} while((cp < oline->s + oline->len) && i < 3);
 
-	if(cp >= oline->s + oline->len) {
+	if(cp == NULL || cp0 == NULL || cp >= oline->s + oline->len) {
 		LM_ERR("broken o= line - version field not found\n");
 		return -1;
 	}