]> git.michaelhowe.org Git - packages/o/openafs.git/commit
kdb: don't dereference a null pointer on corrupt database
authorGarrett Wollman <wollman@csail.mit.edu>
Tue, 9 Aug 2011 01:18:15 +0000 (21:18 -0400)
committerDerrick Brashear <shadow@dementia.org>
Thu, 11 Aug 2011 03:43:18 +0000 (20:43 -0700)
commit24471095dc768f13c4b246f1ff04c5793c93a1c3
tree7a9255d8fb04e834a6d583e045f4f806de37fffd
parent4952c8212a1dd3d996eb4577b0390f21b2ee4cb7
kdb: don't dereference a null pointer on corrupt database

When iterating through the database, kdb would dereference a
null pointer if it encountered an error retrieving the value
or if the value was not the right length, in code that was clearly
cut-and-pasted from the other branch of an "if" statement where a
specific entry was requested on the command line.  Print the name
of the entry with the problem as was apparently intended.

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5174
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ae6a3929489035ddcd17785abab8900cebd22eb3)

Change-Id: I5c79189f82a636b923c074d3c69cb3b6fef732aa
Reviewed-on: http://gerrit.openafs.org/5188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/kauth/kdb.c