Fix wrong offset bug in ng_enaddr_unparse().
This commit is contained in:
parent
280b4748af
commit
7f98dc0449
@ -734,7 +734,8 @@ ng_enaddr_unparse(const struct ng_parse_type *type,
|
||||
int len;
|
||||
|
||||
len = snprintf(cbuf, cbuflen, "%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
data[0], data[1], data[2], data[3], data[4], data[5]);
|
||||
data[*off], data[*off + 1], data[*off + 2],
|
||||
data[*off + 3], data[*off + 4], data[*off + 5]);
|
||||
if (len >= cbuflen)
|
||||
return (ERANGE);
|
||||
*off += ETHER_ADDR_LEN;
|
||||
|
Loading…
Reference in New Issue
Block a user