Module: kamailio
Branch: master
Commit: f6da027c4701fa1de02cf49bb1c4528849d052a9
URL:
https://github.com/kamailio/kamailio/commit/f6da027c4701fa1de02cf49bb1c4528…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-01-30T16:45:26+01:00
cfgt: check first out of range index
---
Modified: src/modules/cfgt/cfgt_json.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f6da027c4701fa1de02cf49bb1c4528…
Patch:
https://github.com/kamailio/kamailio/commit/f6da027c4701fa1de02cf49bb1c4528…
---
diff --git a/src/modules/cfgt/cfgt_json.c b/src/modules/cfgt/cfgt_json.c
index 458ef93..2974adf 100644
--- a/src/modules/cfgt/cfgt_json.c
+++ b/src/modules/cfgt/cfgt_json.c
@@ -92,7 +92,7 @@ int _cfgt_xavp_dump_lookup(pv_param_t *param)
xname = (pv_xavp_name_t*)param->pvn.u.dname;
- while(_cfgt_xavp_dump[i]!=NULL&&i<CFGT_XAVP_DUMP_SIZE)
+ while(i<CFGT_XAVP_DUMP_SIZE && _cfgt_xavp_dump[i]!=NULL)
{
if(_cfgt_xavp_dump[i]->len==xname->name.len)
{
@@ -386,4 +386,4 @@ int cfgt_get_json(struct sip_msg* msg, unsigned int mask, srjson_doc_t
*jdoc,
error:
srjson_Delete(jdoc, head);
return -1;
-}
\ No newline at end of file
+}