]> git.baikalelectronics.ru Git - kernel.git/commit
strscpy: zero any trailing garbage bytes in the destination
authorChris Metcalf <cmetcalf@ezchip.com>
Tue, 6 Oct 2015 16:37:41 +0000 (12:37 -0400)
committerChris Metcalf <cmetcalf@ezchip.com>
Tue, 6 Oct 2015 18:53:18 +0000 (14:53 -0400)
commit8b0affec107f46028e3b997e994ea93b2de4896d
tree145c16309dfc5586b5120d7b7c7d585337e8d5d1
parent0bf7160eaa8d4bec9a23f6400d57a8527e8d19d9
strscpy: zero any trailing garbage bytes in the destination

It's possible that the destination can be shadowed in userspace
(as, for example, the perf buffers are now).  So we should take
care not to leak data that could be inspected by userspace.

Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
lib/string.c