]> git.michaelhowe.org Git - packages/o/openafs.git/commit
fs: Fix improper use of readlink
authorStephan Wiesand <stephan.wiesand@desy.de>
Thu, 10 Apr 2014 15:59:24 +0000 (17:59 +0200)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 4 Jun 2014 14:46:41 +0000 (10:46 -0400)
commit9e227094914d1a74b64f247cb74793c429930b25
tree8975acc0af7ba3ae95eac47a80e0724c42c2ca37
parentd08e048e57906574d3e505a345e0935d1df2dba4
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.

This is a 1.6-only change

It is inspired by commit 25011b4544e48dffd5978201669f7b9e23da3144
which cannot be cherry picked due to other missing commits on
the 1.6 branch, like 763ec5250deef6f0f8ae1c85b52bac3ffc1a6176.

Change-Id: I5c3f2946f7c1b8e935ae46bc195f58e207e115d6
Reviewed-on: http://gerrit.openafs.org/11054
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/venus/fs.c