commit | 2da222f612b58b6e6b41972f46005b58aac1699e | [log] [tgz] |
---|---|---|
author | Takashi Iwai <tiwai@suse.de> | Sun Mar 15 10:35:03 2020 +0100 |
committer | David S. Miller <davem@davemloft.net> | Sun Mar 15 17:06:22 2020 -0700 |
tree | 0158c85ae4a0e88363acec4ea23c0049983b7605 | |
parent | 5e892880e14fbc1944f49aa42a67496516fe5dac [diff] |
net: netdevsim: 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: Jakub Kicinski <kuba@kernel.org> Cc: netdev@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>