ntb_perf: potential info leak in debugfs
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Oct 2016 07:34:18 +0000 (10:34 +0300)
committerJon Mason <jdmason@kudzu.us>
Sun, 13 Nov 2016 21:48:30 +0000 (16:48 -0500)
commit819baf885953b588b63bef28e5598daf9ed4ddf9
treec4c576acfae821524f886b7f12841f9168ffa6ff
parent25ea9f2bf5f76082da919f2a91ea8d920932c1da
ntb_perf: potential info leak in debugfs

This is a static checker warning, not something I'm desperately
concerned about.  But snprintf() returns the number of bytes that
would have been copied if there were space.  We really care about the
number of bytes that actually were copied so we should use scnprintf()
instead.

It probably won't overrun, and in that case we may as well just use
sprintf() but these sorts of things make static checkers and code
reviewers happier.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/test/ntb_perf.c