commit | 4a348601eb9131893c22b6ed2d3b6ba2bafc2391 | [log] [tgz] |
---|---|---|
author | Takashi Iwai <tiwai@suse.de> | Sun Mar 15 10:34:59 2020 +0100 |
committer | David S. Miller <davem@davemloft.net> | Sun Mar 15 17:06:22 2020 -0700 |
tree | 15aa81cb350aef607c945bf6ade1ac0acb66cf75 | |
parent | 13bde56c5b7cc6489eb50c40449d461c7ca4da2d [diff] |
net: mlx4: Use scnprintf() for avoiding potential buffer overflow Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: "David S . Miller" <davem@davemloft.net> Cc: Tariq Toukan <tariqt@mellanox.com> To: netdev@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>