Commit d0763469 by Xinliang David Li Committed by Xinliang David Li

dbgcnt name matching bug fix

From-SVN: r149830
parent 752fd2a8
2009-07-20 Xinliang David Li <davidxl@google.com>
* dbgcnt.c (dbg_cnt_set_limit_by_name): Add length check.
2009-07-20 Adam Nemet <anemet@caviumnetworks.com>
* config/mips/mips.md (move_type): Add arith.
......
......@@ -82,7 +82,8 @@ dbg_cnt_set_limit_by_name (const char *name, int len, int value)
{
int i;
for (i = debug_counter_number_of_counters - 1; i >= 0; i--)
if (!strncmp (map[i].name, name, len))
if (strncmp (map[i].name, name, len) == 0
&& map[i].name[len] == '\0')
break;
if (i < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment