Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
- sscanf((const char *)id_p, "%255s", extctr->match_criteria);
+ {
+ size_t l = strlen(id_p);
+ if (l >= sizeof(extctr->match_criteria))
+ l = sizeof(extctr->match_criteria)-1;
+ memcpy(extctr->match_criteria, id_p, l);
+ extctr->match_criteria[l] = '\0';
+ }
if (strlen(look) > name_len)
{
if (look[name_len] == '=' && !memcmp(look, name, name_len))
if (strlen(look) > name_len)
{
if (look[name_len] == '=' && !memcmp(look, name, name_len))
if (attr_content_pi(&look, "id", id, sizeof(id)))
;
else if (attr_content_pi(&look, "rank", rank, sizeof(rank)))
;
else if (attr_content_pi(&look, "type", type, sizeof(type)))
if (attr_content_pi(&look, "id", id, sizeof(id)))
;
else if (attr_content_pi(&look, "rank", rank, sizeof(rank)))
;
else if (attr_content_pi(&look, "type", type, sizeof(type)))
{
dom_log(YLOG_WARN, tinfo, node,
"content '%s', can not parse '%s'",
pi_p, look);
break;
}
{
dom_log(YLOG_WARN, tinfo, node,
"content '%s', can not parse '%s'",
pi_p, look);
break;
}
set_record_info(tinfo, extctr, node, id, rank, type);
}
/* parsing index instruction */
set_record_info(tinfo, extctr, node, id, rank, type);
}
/* parsing index instruction */