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: fce8a7bb (PCI-Express Non-Transparent Bridge Support) Fixes: 282a2fee (NTB: Use DMA Engine to Transmit and Receive) Fixes: a754a8fc (NTB: allocate number transport entries depending on size of ring size) Fixes: d98ef99e (NTB: Clean up QP stats info) Fixes: e74bfeed (NTB: Add flow control to the ntb_netdev) Fixes: 569410ca (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>
Showing
Please register or sign in to comment