Skip to content
Commit 3f16330a authored by Shravan Kumar Ramani's avatar Shravan Kumar Ramani Committed by Greg Kroah-Hartman
Browse files

platform/mellanox: mlxbf-pmc: Fix potential buffer overflows



[ Upstream commit 80ccd405 ]

Replace sprintf with sysfs_emit where possible.
Size check in mlxbf_pmc_event_list_show should account for "\0".

Fixes: 1a218d31 ("platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver")
Signed-off-by: default avatarShravan Kumar Ramani <shravankr@nvidia.com>
Reviewed-by: default avatarVadim Pasternak <vadimp@nvidia.com>
Reviewed-by: default avatarDavid Thompson <davthompson@nvidia.com>
Link: https://lore.kernel.org/r/bef39ef32319a31b32f999065911f61b0d3b17c3.1693917738.git.shravankr@nvidia.com


Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3a45dcfb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment