OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-3412-g6d2d18d
Gerrit Code Review
gerrit@openafs.org
Thu, 21 Feb 2013 09:01:01 -0800 (PST)
The following commit has been merged in the master branch:
commit 6d2d18dfebaea74a30f263e743bdbd1fb14f0580
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 11:55:37 2013 +0000
Fix incorrect sizeof() arguments in allocations
In a number of places we have
struct X *val;
val = malloc(sizeof(struct Y));
If sizeof(struct Y) < sizeof(struct X) this is obviously dangerous,
but it is incorrect regardless of the relative sizes of the
structures. Fix all of the occurences of this that clang points out
to us.
Caught by clang-analyzer
Change-Id: Iad32b4ae460d3f40a45cf33624973bf52fd167d4
Reviewed-on: http://gerrit.openafs.org/9156
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/budb/procs.c | 4 ++--
src/libadmin/vos/vosutils.c | 2 +-
src/libafscp/afscp_server.c | 3 ++-
src/lwp/iomgr.c | 10 +++++-----
src/rx/rx_multi.c | 2 +-
src/viced/afsfileprocs.c | 2 +-
6 files changed, 12 insertions(+), 11 deletions(-)
--
OpenAFS Master Repository