OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_12pre1-9-g33a14ea
Gerrit Code Review
gerrit@openafs.org
Thu, 28 May 2015 08:58:23 -0400
The following commit has been merged in the openafs-stable-1_6_x branch:
commit 33a14ea9a205fe9d8ea2f5d6cf28e9cbc20aabeb
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed May 20 10:57:53 2015 -0400
afsio: switch BreakUpPath to strdup
The current version of BreakUpPath is slightly broken, since
commit 4e68282e26b0c4569d25d076d54274f0da47a691 -- it has two
output parameters but takes only one length parameter for the
size of the output buffers passed in. The callers ended up using
the shorter of the buffer lengths in question, so there is not
a risk of a buffer overrun, but long paths would not be properly
handled.
There is not really any need to pass in a length at all, since
what is going on is conceptually strdup, and there is no real
need to use strlcpy at all. Make the change from strlcpy to
str(n)dup, and adjust callers to free the outputs as appropriate.
While here, convert writeFile() to use goto and a cleanup handler
to avoid leaks.
Reviewed-on: http://gerrit.openafs.org/11874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
(cherry picked from commit b8648dbefb3968329d20cad8976ce15947428678)
Change-Id: I13d4ffd4ef46cbb7423d229cf6a6e85f7a42ecc1
Reviewed-on: http://gerrit.openafs.org/11879
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/venus/afsio.c | 103 ++++++++++++++++++++++++++++------------------------
1 files changed, 55 insertions(+), 48 deletions(-)
--
OpenAFS Master Repository