public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: ced1401: userspace: use1401.c:  Cleaning up potential strncpy missing null-terminate
@ 2014-06-14 22:41 Rickard Strandqvist
  2014-06-14 22:41 ` Rickard Strandqvist
  0 siblings, 1 reply; 6+ messages in thread
From: Rickard Strandqvist @ 2014-06-14 22:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rickard Strandqvist
  Cc: Monam Agarwal, devel, linux-kernel

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
There is also a wrong use of strncat, it should have used sizeof - strlen.

This was found using a static code analysis program called cppcheck.

Rickard Strandqvist (1):
  staging: ced1401: userspace: use1401.c:  Cleaning up potential strncpy missing null-terminate

 drivers/staging/ced1401/userspace/use1401.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-17  5:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-14 22:41 [PATCH] staging: ced1401: userspace: use1401.c: Cleaning up potential strncpy missing null-terminate Rickard Strandqvist
2014-06-14 22:41 ` Rickard Strandqvist
2014-06-16 19:01   ` Dan Carpenter
2014-06-16 19:09     ` Dan Carpenter
2014-06-16 22:14       ` Rickard Strandqvist
2014-06-17  5:56         ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox