浏览代码

debugger: re-order loop condition to avoid out of bounds access

Daniel-Constantin Mierla 9 年之前
父节点
当前提交
ef4d771a25
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/debugger/debugger_json.c

+ 1 - 1
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)
 		{