Module: kamailio
Branch: 4.2
Commit: 2556a840208f4d16973772547af8258f314cef8c
URL: https://github.com/kamailio/kamailio/commit/2556a840208f4d16973772547af8258…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-08T14:25:13+01:00
dmq: safety check for peer_list when calling the callbacks
- can result in crashing if it is not set
- reported by Olle E. Johansson
(cherry picked from commit cc5f96f9c847d285085b0b9809ff0db76ea0a835)
---
Modified: modules/dmq/notification_peer.c
---
Diff: https://github.com/kamailio/kamailio/commit/2556a840208f4d16973772547af8258…
Patch: https://github.com/kamailio/kamailio/commit/2556a840208f4d16973772547af8258…
---
diff --git a/modules/dmq/notification_peer.c b/modules/dmq/notification_peer.c
index 1d804bd..b493717 100644
--- a/modules/dmq/notification_peer.c
+++ b/modules/dmq/notification_peer.c
@@ -173,6 +173,10 @@ int extract_node_list(dmq_node_list_t* update_list, struct sip_msg* msg)
int run_init_callbacks() {
dmq_peer_t* crt;
+ if(peer_list==0) {
+ LM_WARN("peer list is null\n");
+ return 0;
+ }
crt = peer_list->peers;
while(crt) {
if (crt->init_callback) {
Module: kamailio
Branch: master
Commit: cc5f96f9c847d285085b0b9809ff0db76ea0a835
URL: https://github.com/kamailio/kamailio/commit/cc5f96f9c847d285085b0b9809ff0db…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-08T14:20:58+01:00
dmq: safety check for peer_list when calling the callbacks
- can result in crashing if it is not set
- reported by Olle E. Johansson
---
Modified: modules/dmq/notification_peer.c
---
Diff: https://github.com/kamailio/kamailio/commit/cc5f96f9c847d285085b0b9809ff0db…
Patch: https://github.com/kamailio/kamailio/commit/cc5f96f9c847d285085b0b9809ff0db…
---
diff --git a/modules/dmq/notification_peer.c b/modules/dmq/notification_peer.c
index 1d804bd..b493717 100644
--- a/modules/dmq/notification_peer.c
+++ b/modules/dmq/notification_peer.c
@@ -173,6 +173,10 @@ int extract_node_list(dmq_node_list_t* update_list, struct sip_msg* msg)
int run_init_callbacks() {
dmq_peer_t* crt;
+ if(peer_list==0) {
+ LM_WARN("peer list is null\n");
+ return 0;
+ }
crt = peer_list->peers;
while(crt) {
if (crt->init_callback) {