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)
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>

No differences found