OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-3433-g86c7369
Gerrit Code Review
gerrit@openafs.org
Fri, 22 Feb 2013 13:04:01 -0800 (PST)
The following commit has been merged in the master branch:
commit 735c9cff53bbf6f2b250a719507d7909e77c48e2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:30:14 2013 +0000
libafscp: Don't free bogus ptr in ResolvPathFromVol
afscp_ResolvPathFromVol makes a copy of the path passed to it using
strdup. It then iterates across that, removing initial '/' characters.
However, this iteration means that 'p' no longer points to the start
of the allocated memory - when we free 'p', we may actually be freeing
an offset into the block, which will make malloc unhappy.
Make a copy of the result from strdup, and use that to free the block.
Caught by clang-analyzer
Change-Id: I0e7d8c7cf3b70baa4868c65fb4c3a32474557628
Reviewed-on: http://gerrit.openafs.org/9196
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/libafscp/afscp_dir.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
--
OpenAFS Master Repository