diff options
author | Guvenc Gulce <guvenc@linux.ibm.com> | 2021-01-12 17:21:22 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-12 20:22:01 -0800 |
commit | 8a4465368964b4fbaf084760c94c7aabf61059fb (patch) | |
tree | 06a00842a100de9d64eaac60c872e98a060714db /net/switchdev | |
parent | 25fe2c9c4cd2e97c5f5b69f3aefe69aad3057936 (diff) | |
download | linux-8a4465368964b4fbaf084760c94c7aabf61059fb.tar.gz linux-8a4465368964b4fbaf084760c94c7aabf61059fb.tar.bz2 linux-8a4465368964b4fbaf084760c94c7aabf61059fb.zip |
net/smc: use memcpy instead of snprintf to avoid out of bounds read
Using snprintf() to convert not null-terminated strings to null
terminated strings may cause out of bounds read in the source string.
Therefore use memcpy() and terminate the target string with a null
afterwards.
Fixes: a3db10efcc4c ("net/smc: Add support for obtaining SMCR device list")
Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/switchdev')
0 files changed, 0 insertions, 0 deletions