]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
bos: don't dereference a null pointer when printing an error message
authorGarrett Wollman <wollman@csail.mit.edu>
Tue, 9 Aug 2011 03:26:38 +0000 (23:26 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 10 Aug 2011 03:53:43 +0000 (20:53 -0700)
The parameter we are interested in is at MRAFS_OFFSET + 17, not
MRAFS_OFFSET + 13.

Change-Id: Ib856ff40c5949cde95a2b277cd44253b87c3c2a4
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5178
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/bozo/bos.c

index 5d74868bcc4cfa4cf0225b8b8163e79f7ae86ed9..e108f225e216b2561fbe1275dd4a884c6f81295b 100644 (file)
@@ -1566,7 +1566,7 @@ SalvageCmd(struct cmd_syndesc *as, void *arock)
                               &mrafsParm.OptResidencies);
            if (code) {
                printf("bos: '%s' is not a valid residency mask.\n",
-                      as->parms[MRAFS_OFFSET + 13].items->data);
+                      as->parms[MRAFS_OFFSET + 17].items->data);
                return code;
            }
        }