Fix wrong offset bug in ng_enaddr_unparse().

This commit is contained in:
Archie Cobbs 2000-09-01 00:28:03 +00:00
parent 280b4748af
commit 7f98dc0449

View File

@ -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;