Module: sip-router
Branch: master
Commit: 269220f9a657ca10085ae8889312d052b65b12f8
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=269220f9a657ca10085ae8889312d052b65b12f8

Author: Jason Penton <[email protected]>
Committer: Jason Penton <[email protected]>
Date:   Thu Jun 26 09:46:16 2014 +0200

modules/cdp: prevent possible seg fault if no MSCC AVP present in CCA response 
to update GSU timers

---

 modules/cdp/acctstatemachine.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/cdp/acctstatemachine.c b/modules/cdp/acctstatemachine.c
index 8537d0d..d4e524d 100644
--- a/modules/cdp/acctstatemachine.c
+++ b/modules/cdp/acctstatemachine.c
@@ -31,6 +31,10 @@ inline void update_gsu_response_timers(cdp_cc_acc_session_t* 
session, AAAMessage
        AAA_AVP *z;
 
        avp = AAAFindMatchingAVP(msg, 0, AVP_Multiple_Services_Credit_Control, 
0, 0);
+        if (!avp) {
+            LM_WARN("Trying to update GSU timers but there is no MSCC AVP in 
the CCA response\n");
+            return;
+        }
        mscc_avp_list = AAAUngroupAVPS(avp->data);
        AAA_AVP *mscc_avp = mscc_avp_list.head;
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to