Skip to content
Commit 8a446536 authored by Guvenc Gulce's avatar Guvenc Gulce Committed by Jakub Kicinski
Browse files

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: a3db10ef ("net/smc: Add support for obtaining SMCR device list")
Signed-off-by: default avatarGuvenc Gulce <guvenc@linux.ibm.com>
Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 25fe2c9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment