]> 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)
commit9f25f1a99dedea52d40fbccbd70b46f164956da0
treec4c576acfae821524f886b7f12841f9168ffa6ff
parentc60036bc3cd02e7a6e2c4f3395699db430521a3d
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