Browse Source

MT#56128 Fix a defect detected by the CoverityScan

*** CID 1534508:  Null pointer dereferences  (FORWARD_NULL)
/daemon/call_interfaces.c: 614 in ng_sdp_attr_manipulations()
608
609     INLINE void ng_sdp_attr_manipulations(GQueue *sdp_attr_manipulations, bencode_item_t *value) {
610
611     	if (!value || value->type != BENCODE_DICTIONARY)
612     		ilog(LOG_WARN, "SDP manipulations: Wrong type for this type of command.");
613
>>>     CID 1534508:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "value".
614     	for (bencode_item_t *it = value->child; it; it = it->sibling)
615     	{
616     		bencode_item_t *command_action = it->sibling ? it->sibling : NULL;
617     		enum media_type media;
618     		str media_type;
619

Change-Id: Iba634f785f3a235098bf5794c770132e2723d899
pull/1623/head
Donat Zenichev 3 years ago
parent
commit
af643cb3a2
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      daemon/call_interfaces.c

+ 3
- 1
daemon/call_interfaces.c View File

@ -608,8 +608,10 @@ INLINE void ng_osrtp_option(struct sdp_ng_flags *out, str *s, void *dummy) {
INLINE void ng_sdp_attr_manipulations(GQueue *sdp_attr_manipulations, bencode_item_t *value) { INLINE void ng_sdp_attr_manipulations(GQueue *sdp_attr_manipulations, bencode_item_t *value) {
if (!value || value->type != BENCODE_DICTIONARY)
if (!value || value->type != BENCODE_DICTIONARY) {
ilog(LOG_WARN, "SDP manipulations: Wrong type for this type of command."); ilog(LOG_WARN, "SDP manipulations: Wrong type for this type of command.");
return;
}
for (bencode_item_t *it = value->child; it; it = it->sibling) for (bencode_item_t *it = value->child; it; it = it->sibling)
{ {


Loading…
Cancel
Save