fs: Fix improper use of readlink
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 1 Mar 2013 12:08:46 +0000 (12:08 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 10 Mar 2013 03:12:47 +0000 (19:12 -0800)
commit25011b4544e48dffd5978201669f7b9e23da3144
treeaa3695a7ee8daa467b56a6ace4c44a4b80957ad9
parent908105fe8d51551e45692de4e145022138a0356c
fs: Fix improper use of readlink

readlink returns a non-NUL terminated buffer. If we are going to
terminate its response, we need to make sure that there's space to
do so. So the length passed to readlink should be one less than the
real length of the buffer.

Caught by coverity (#985596)

Change-Id: I47081877a54a7b3d99ab8e6ec52d4663acd2eeb6
Reviewed-on: http://gerrit.openafs.org/9328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/venus/fs.c