]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Fix disk name initialization in scout
authorBenjamin Kaduk <kaduk@mit.edu>
Wed, 17 Sep 2014 16:07:02 +0000 (12:07 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 6 Nov 2015 12:31:54 +0000 (07:31 -0500)
commit3ce1880c08663e07e0b2817c83c011ca7c250bf2
treecc170a7c8366771f2098253aa9cd56dca34880d4
parentb6294fd5f484e933fff627a69032a8c5ef0de568
Fix disk name initialization in scout

Scout needs to initialize names in scout_disk structures to prevent
the use of uninitialized data.  However, '\0' is a NUL character
constant, i.e., the integer value 0, which is interpreted as NULL
(the pointer constant) in a pointer context, such as when assigned to
a variable of type char*.  Since the name field in these structs is
passed to printing routines, the safe initialization value is the
empty string constant "", not a zero value.

Reviewed-on: http://gerrit.openafs.org/11469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 57ca77786eb6c04519f9358f1456fdf5b8006757)

Change-Id: I970e19c698cc26255cd244671908a631ef959c30
Reviewed-on: http://gerrit.openafs.org/12078
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/scout/scout.c