OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-3562-g28a441e
Gerrit Code Review
gerrit@openafs.org
Sun, 3 Mar 2013 19:03:57 -0800 (PST)
The following commit has been merged in the master branch:
commit 28a441ebd8323437bf762a790b4ec5e6301e4bec
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 12:01:19 2013 +0000
util: Fix overflows in address parsing
The extractAddr function (which turns a dotted quad into an IP
address), has a number of overflows when one or more elements of
the quad are more than 31 characters in length.
The array allocated for each portion is 32 bytes long, but we only
stop writing into the array when the indexing pointer reaches 32,
which doesn't leave us with space for the trailing NULL.
Rework this so we always allow space for the NULL, and use a #define
for the array length to make it more clear whats going on.
Caught by coverity (#985591, #985592, #985593, #985594)
Change-Id: I33ecc78ba6c90e44c3a4f2df171abba1d58562b3
Reviewed-on: http://gerrit.openafs.org/9327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/util/hostparse.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
--
OpenAFS Master Repository