NTB: ntb_transport: 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().
Fixes: fce8a7bb5b4b (PCI-Express Non-Transparent Bridge Support)
Fixes: 282a2feeb9bf (NTB: Use DMA Engine to Transmit and Receive)
Fixes: a754a8fcaf38 (NTB: allocate number transport entries depending on size of ring size)
Fixes: d98ef99e378b (NTB: Clean up QP stats info)
Fixes: e74bfeedad08 (NTB: Add flow control to the ntb_netdev)
Fixes: 569410ca756c (NTB: Use unique DMA channels for TX and RX)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
1 file changed