Browse Source

MT#56128 SDP manipulations: CMD_REM check emptiness of attribute

Do not proceed to the `g_hash_table_lookup()` if the `attr_name`
is empty.

Additonally: improve slightly the same check for the CMD_SUBST.

Change-Id: I39e34c34b458150ebae38dff5e6a46f6e8f17c66
pull/1640/head
Donat Zenichev 3 years ago
parent
commit
1a2d96d4b3
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      daemon/sdp.c

+ 5
- 1
daemon/sdp.c View File

@ -324,7 +324,7 @@ static int sdp_manipulate_check(enum command_type command_type,
case CMD_SUBST:; case CMD_SUBST:;
q_ptr = NULL; q_ptr = NULL;
if (!attr_name)
if (!attr_name || !attr_name->len)
break; break;
struct sdp_substitute_attr fictitious = {attr_name, NULL}; struct sdp_substitute_attr fictitious = {attr_name, NULL};
@ -361,6 +361,10 @@ static int sdp_manipulate_check(enum command_type command_type,
case CMD_REM:; case CMD_REM:;
GHashTable *ht = NULL; GHashTable *ht = NULL;
if (!attr_name || !attr_name->len)
break;
switch (media_type) { switch (media_type) {
case MT_AUDIO: case MT_AUDIO:
ht = sdp_manipulations->rem_commands_audio; ht = sdp_manipulations->rem_commands_audio;


Loading…
Cancel
Save