Module: kamailio
Branch: master
Commit: f6a05336de65bb929854c5843e5aa821901b63eb
URL:
https://github.com/kamailio/kamailio/commit/f6a05336de65bb929854c5843e5aa82…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-12-08T16:50:51+01:00
sipdump: safety check for received address
---
Modified: src/modules/sipdump/sipdump_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f6a05336de65bb929854c5843e5aa82…
Patch:
https://github.com/kamailio/kamailio/commit/f6a05336de65bb929854c5843e5aa82…
---
diff --git a/src/modules/sipdump/sipdump_mod.c b/src/modules/sipdump/sipdump_mod.c
index c95e0b091a..3247d71a70 100644
--- a/src/modules/sipdump/sipdump_mod.c
+++ b/src/modules/sipdump/sipdump_mod.c
@@ -229,7 +229,8 @@ int ki_sipdump_send(sip_msg_t *msg, str *stag)
}
sdi.af.len = 4;
- if(msg->rcv.bind_address->address.af==AF_INET6) {
+ if(msg->rcv.bind_address!=NULL
+ && msg->rcv.bind_address->address.af==AF_INET6) {
sdi.af.s = "ipv6";
} else {
sdi.af.s = "ipv4";
@@ -298,7 +299,8 @@ int sipdump_msg_received(sr_event_param_t *evp)
sdi.dst_port = (int)evp->rcv->bind_address->port_no;
}
sdi.af.len = 4;
- if(evp->rcv->bind_address->address.af==AF_INET6) {
+ if(evp->rcv->bind_address!=NULL
+ && evp->rcv->bind_address->address.af==AF_INET6) {
sdi.af.s = "ipv6";
} else {
sdi.af.s = "ipv4";