mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 16:49:20 +00:00
check if number of ice candidate does not exceed stirage size
This commit is contained in:
parent
0cd9605644
commit
20fe706f7d
2 changed files with 4 additions and 2 deletions
|
|
@ -487,7 +487,9 @@ static void sdp_parse_media_ice_parameters(belle_sdp_media_description_t *media_
|
|||
att_name = belle_sdp_attribute_get_name(attribute);
|
||||
value = belle_sdp_attribute_get_value(attribute);
|
||||
|
||||
if ((keywordcmp("candidate", att_name) == 0) && (value != NULL)) {
|
||||
if ( (nb_ice_candidates < sizeof (stream->ice_candidates)/sizeof(SalIceCandidate))
|
||||
&& (keywordcmp("candidate", att_name) == 0)
|
||||
&& (value != NULL)) {
|
||||
SalIceCandidate *candidate = &stream->ice_candidates[nb_ice_candidates];
|
||||
char proto[4];
|
||||
int nb = sscanf(value, "%s %u %3s %u %s %d typ %s raddr %s rport %d",
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ typedef struct SalIceCandidate {
|
|||
int rport;
|
||||
} SalIceCandidate;
|
||||
|
||||
#define SAL_MEDIA_DESCRIPTION_MAX_ICE_CANDIDATES 10
|
||||
#define SAL_MEDIA_DESCRIPTION_MAX_ICE_CANDIDATES 20
|
||||
|
||||
typedef struct SalIceRemoteCandidate {
|
||||
char addr[SAL_MEDIA_DESCRIPTION_MAX_ICE_ADDR_LEN];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue