OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_2-24-g486ba70
Gerrit Code Review
gerrit@openafs.org
Fri, 22 Mar 2013 05:58:34 -0700 (PDT)
The following commit has been merged in the openafs-stable-1_6_x branch:
commit 486ba708442aa7296503dc44f2c2662ed784725f
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)
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>
(cherry picked from commit 28a441ebd8323437bf762a790b4ec5e6301e4bec)
Change-Id: I9506fd8b468c957f0c9f8dc2d58baf5bc6bc2e19
Reviewed-on: http://gerrit.openafs.org/9372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/util/hostparse.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
--
OpenAFS Master Repository