Module: kamailio
Branch: master
Commit: ef4d771a2511ba6c288d85c6312ea25990a76669
URL:
https://github.com/kamailio/kamailio/commit/ef4d771a2511ba6c288d85c6312ea25…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-11-02T21:04:10+01:00
debugger: re-order loop condition to avoid out of bounds access
---
Modified: modules/debugger/debugger_json.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ef4d771a2511ba6c288d85c6312ea25…
Patch:
https://github.com/kamailio/kamailio/commit/ef4d771a2511ba6c288d85c6312ea25…
---
diff --git a/modules/debugger/debugger_json.c b/modules/debugger/debugger_json.c
index 3d9150c..2cdadc4 100644
--- a/modules/debugger/debugger_json.c
+++ b/modules/debugger/debugger_json.c
@@ -93,7 +93,7 @@ int _dbg_xavp_dump_lookup(pv_param_t *param)
xname = (pv_xavp_name_t*)param->pvn.u.dname;
- while(_dbg_xavp_dump[i]!=NULL&&i<DBG_XAVP_DUMP_SIZE)
+ while(i<DBG_XAVP_DUMP_SIZE && _dbg_xavp_dump[i]!=NULL)
{
if(_dbg_xavp_dump[i]->len==xname->name.len)
{