mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 02:02:28 +09:00
qed: Fix use of incorrect size in memcpy call.
[ Upstream commitcc9b27cdf7] Use the correct size value while copying chassis/port id values. Fixes:6ad8c632e("qed: Add support for query/config dcbx.") Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com> Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4c2849931b
commit
023a2043bc
@@ -700,9 +700,9 @@ qed_dcbx_get_local_lldp_params(struct qed_hwfn *p_hwfn,
|
||||
p_local = &p_hwfn->p_dcbx_info->lldp_local[LLDP_NEAREST_BRIDGE];
|
||||
|
||||
memcpy(params->lldp_local.local_chassis_id, p_local->local_chassis_id,
|
||||
ARRAY_SIZE(p_local->local_chassis_id));
|
||||
sizeof(p_local->local_chassis_id));
|
||||
memcpy(params->lldp_local.local_port_id, p_local->local_port_id,
|
||||
ARRAY_SIZE(p_local->local_port_id));
|
||||
sizeof(p_local->local_port_id));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -714,9 +714,9 @@ qed_dcbx_get_remote_lldp_params(struct qed_hwfn *p_hwfn,
|
||||
p_remote = &p_hwfn->p_dcbx_info->lldp_remote[LLDP_NEAREST_BRIDGE];
|
||||
|
||||
memcpy(params->lldp_remote.peer_chassis_id, p_remote->peer_chassis_id,
|
||||
ARRAY_SIZE(p_remote->peer_chassis_id));
|
||||
sizeof(p_remote->peer_chassis_id));
|
||||
memcpy(params->lldp_remote.peer_port_id, p_remote->peer_port_id,
|
||||
ARRAY_SIZE(p_remote->peer_port_id));
|
||||
sizeof(p_remote->peer_port_id));
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user