[PATCH 5.4 58/69] mlxsw: thermal: Fix out-of-bounds memory accesses