]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit992ea8d54b7c19fe139afda2c66012e5af7bde53
treec4c576acfae821524f886b7f12841f9168ffa6ff
parent0fea7e008b5114e950ecab1c265fcbaa4345df1b
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