mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
modules: Fix uninit value in rtp-send
https://scan7.coverity.com:8443/reports.htm#v10205/p10016/fileInstanceId=8803&defectInstanceId=3705&mergedDefectId=591292&eventIds=3705-36&eventId=3705-36 see http://silviocesare.wordpress.com/2007/10/22/setting-sin_zero-to-0-in-struct-sockaddr_in/ Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
parent
e11b699d45
commit
d3cddfed5c
1 changed files with 6 additions and 0 deletions
|
|
@ -251,11 +251,14 @@ int pa__init(pa_module*m) {
|
|||
if (inet_pton(AF_INET, src_addr, &src_sa4.sin_addr) > 0) {
|
||||
src_sa4.sin_family = af = AF_INET;
|
||||
src_sa4.sin_port = htons(0);
|
||||
memset(&src_sa4.sin_zero, 0, sizeof(src_sa4.sin_zero));
|
||||
src_sap_sa4 = src_sa4;
|
||||
#ifdef HAVE_IPV6
|
||||
} else if (inet_pton(AF_INET6, src_addr, &src_sa6.sin6_addr) > 0) {
|
||||
src_sa6.sin6_family = af = AF_INET6;
|
||||
src_sa6.sin6_port = htons(0);
|
||||
src_sa6.sin6_flowinfo = 0;
|
||||
src_sa6.sin6_scope_id = 0;
|
||||
src_sap_sa6 = src_sa6;
|
||||
#endif
|
||||
} else {
|
||||
|
|
@ -270,12 +273,15 @@ int pa__init(pa_module*m) {
|
|||
if (inet_pton(AF_INET, dst_addr, &dst_sa4.sin_addr) > 0) {
|
||||
dst_sa4.sin_family = af = AF_INET;
|
||||
dst_sa4.sin_port = htons((uint16_t) port);
|
||||
memset(&dst_sa4.sin_zero, 0, sizeof(dst_sa4.sin_zero));
|
||||
dst_sap_sa4 = dst_sa4;
|
||||
dst_sap_sa4.sin_port = htons(SAP_PORT);
|
||||
#ifdef HAVE_IPV6
|
||||
} else if (inet_pton(AF_INET6, dst_addr, &dst_sa6.sin6_addr) > 0) {
|
||||
dst_sa6.sin6_family = af = AF_INET6;
|
||||
dst_sa6.sin6_port = htons((uint16_t) port);
|
||||
dst_sa6.sin6_flowinfo = 0;
|
||||
src_sa6.sin6_scope_id = 0;
|
||||
dst_sap_sa6 = dst_sa6;
|
||||
dst_sap_sa6.sin6_port = htons(SAP_PORT);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue