DF-0750 / fix.diff
diff --git a/sys/net/ipfw3_layer2/ip_fw3_layer2.c b/sys/net/ipfw3_layer2/ip_fw3_layer2.c --- a/sys/net/ipfw3_layer2/ip_fw3_layer2.c +++ b/sys/net/ipfw3_layer2/ip_fw3_layer2.c @@ -124,7 +124,8 @@ if ((*args)->eh != NULL) { struct sockaddr sa; sa.sa_len = 8; - strncpy(sa.sa_data, (*args)->eh->ether_shost, 6); + memcpy(sa.sa_data, (*args)->eh->ether_shost, 6); + bzero(sa.sa_data + 6, sizeof(sa.sa_data) - 6); ent = (struct table_mac_entry *)rnh->rnh_lookup(&sa, NULL, rnh); if (ent != NULL) *cmd_val = IP_FW_MATCH; |