[PATCH 6.5 269/285] platform/mellanox: mlxbf-pmc: Fix potential buffer overflows