]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
fs/9p: avoid debug OOPS when reading a long symlink
authorJim Meyering <jim@meyering.net>
Tue, 21 Aug 2012 07:20:49 +0000 (09:20 +0200)
committerEric Van Hensbergen <ericvh@gmail.com>
Thu, 6 Sep 2012 18:54:53 +0000 (13:54 -0500)
commitba413ab2ccc49e6aa1ebc3523a75635b5e4a0494
tree616525a5d4954660f290f9130c699002571c05e4
parent4cbe5a555fa58a79b6ecbb6c531b8bab0650778d
fs/9p: avoid debug OOPS when reading a long symlink

Reading a symlink longer than the given buffer, a p9_debug use would
try to print the link name (not NUL-terminated) using a %s format.
Use %.*s instead, and replace the strncpy+strnlen with functionally
equivalent strlen+memcpy.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
fs/9p/vfs_inode.c