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:fa08666255("net/smc: add support for user defined EIDs") Fixes:3c572145c2("net/smc: add generic netlink support for system EID") Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
32 KiB
32 KiB