Module: sip-router
Branch: master
Commit: 4b65964dbe1f38bcf867301d43933f9bbf91ab7d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4b65964…
Author: Jason Penton <jason.penton(a)smilecoms.com>
Committer: Jason Penton <jason.penton(a)smilecoms.com>
Date: Wed Jun 5 08:58:29 2013 +0200
module/ims_auth: protection against crash if there is no auth vector initialised.
- patch submitted by Camille Oudot
---
modules/ims_auth/cxdx_mar.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/ims_auth/cxdx_mar.c b/modules/ims_auth/cxdx_mar.c
index 3e95f6c..2ec113b 100644
--- a/modules/ims_auth/cxdx_mar.c
+++ b/modules/ims_auth/cxdx_mar.c
@@ -411,11 +411,13 @@ success:
stateful_request_reply_async(t, t->uas.request, 401, MSG_401_CHALLENGE);
done:
- start_reg_await_timer(avlist[0]); //start the timer to remove stale or unused Auth
Vectors
+ if (avlist) {
+ start_reg_await_timer(avlist[0]); //start the timer to remove stale or unused
Auth Vectors
- //now we add it to the queue as sent as we have already sent the challenge and used
it and set the status to SENT
- if (!add_auth_vector(private_identity, public_identity, avlist[0]))
- free_auth_vector(avlist[0]);
+ //now we add it to the queue as sent as we have already sent the challenge and
used it and set the status to SENT
+ if (!add_auth_vector(private_identity, public_identity, avlist[0]))
+ free_auth_vector(avlist[0]);
+ }
//free memory
if (maa) cdpb.AAAFreeMessage(&maa);