Module: kamailio
Branch: master
Commit: 4aaaca60ef2207100dd3f4e16ae63428aadc7dc5
URL: 
https://github.com/kamailio/kamailio/commit/4aaaca60ef2207100dd3f4e16ae63428aadc7dc5

Author: Morten Tryfoss <mor...@tryfoss.no>
Committer: Morten Tryfoss <mor...@tryfoss.no>
Date: 2024-08-05T12:14:04+02:00

cdp: Error log caused crash

---

Modified: src/modules/cdp/receiver.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/4aaaca60ef2207100dd3f4e16ae63428aadc7dc5.diff
Patch: 
https://github.com/kamailio/kamailio/commit/4aaaca60ef2207100dd3f4e16ae63428aadc7dc5.patch

---

diff --git a/src/modules/cdp/receiver.c b/src/modules/cdp/receiver.c
index e03307c5e84..67a3a8e6feb 100644
--- a/src/modules/cdp/receiver.c
+++ b/src/modules/cdp/receiver.c
@@ -605,7 +605,7 @@ static inline int do_receive(serviced_peer_t *sp)
                        version = (unsigned char)(sp->buf[0]);
                        if(version != 1) {
                                LM_ERR("do_receive(): [%.*s] Received Unknown 
version [%d]\n",
-                                               sp->p->fqdn.len, sp->p->fqdn.s,
+                                               sp->p ? sp->p->fqdn.len : 0, 
sp->p ? sp->p->fqdn.s : 0,
                                                (unsigned char)sp->buf[0]);
                                goto error_and_reset;
                        } else {

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to