forked from osmocom/wireshark
RTP: Fixup stream ID hashing.
Update our hash value when calling add_address_to_hash. Fixes: ________________________________________________________________________________________________________ *** CID 1476121: Incorrect expression (USELESS_CALL) /home/wireshark/builders/wireshark-master-fuzz/clangcodeanalysis/build/ui/rtp_stream_id.c: 141 in pinfo_rtp_info_to_hash() 135 /* SRC PORT | DST_PORT */ 136 /* SSRC */ 137 /* SRC ADDR */ 138 /* DST ADDR */ 139 hash ^= pinfo->srcport | pinfo->destport << 16; 140 hash ^= rtp_info->info_sync_src; >>> CID 1476121: Incorrect expression (USELESS_CALL) >>> Calling "add_address_to_hash(hash, &pinfo->src)" is only useful for its return value, which is ignored. 141 add_address_to_hash(hash, &pinfo->src); 142 add_address_to_hash(hash, &pinfo->dst); 143 144 return hash; 145 } 146
This commit is contained in:
parent
040212119d
commit
212ff30603
|
@ -79,8 +79,8 @@ guint rtpstream_id_to_hash(const rtpstream_id_t *id)
|
||||||
/* DST ADDR */
|
/* DST ADDR */
|
||||||
hash ^= id->src_port | id->dst_port << 16;
|
hash ^= id->src_port | id->dst_port << 16;
|
||||||
hash ^= id->ssrc;
|
hash ^= id->ssrc;
|
||||||
add_address_to_hash(hash, &id->src_addr);
|
hash = add_address_to_hash(hash, &id->src_addr);
|
||||||
add_address_to_hash(hash, &id->dst_addr);
|
hash = add_address_to_hash(hash, &id->dst_addr);
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
@ -138,8 +138,8 @@ guint pinfo_rtp_info_to_hash(const packet_info *pinfo, const struct _rtp_info *r
|
||||||
/* DST ADDR */
|
/* DST ADDR */
|
||||||
hash ^= pinfo->srcport | pinfo->destport << 16;
|
hash ^= pinfo->srcport | pinfo->destport << 16;
|
||||||
hash ^= rtp_info->info_sync_src;
|
hash ^= rtp_info->info_sync_src;
|
||||||
add_address_to_hash(hash, &pinfo->src);
|
hash = add_address_to_hash(hash, &pinfo->src);
|
||||||
add_address_to_hash(hash, &pinfo->dst);
|
hash = add_address_to_hash(hash, &pinfo->dst);
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue