Windows: cm_BPlusDirEnumBulkStatNext index error
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 7 Mar 2013 14:25:09 +0000 (09:25 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 12 Mar 2013 00:45:52 +0000 (17:45 -0700)
commit470b57cc4a60d18aaab41a58b6a93f8baa3caead
treeb003321387d620a55ed041882bf9b7414ab1191c
parentee79fb61f5a0c996b76a37392b58be01bc8cf19e
Windows: cm_BPlusDirEnumBulkStatNext index error

In cm_BPlusDirEnumBulkStatNext the 'next' variable was being set
even if the FileId was not added to the list of objects added to
the cm_bulkStat array.  Delay the assignment to ensure that 'next'
refers to the first element in the array.

In the CM_ERROR_BULKSTAT_FAILURE processing, 'next' is used to
obtain a reference to the cm_scache object that is supposed to
correlate to the [1] entry in the array.  If 'next' == -1, there
is no such entry.  Add a conditional to ensure that 'next' is not
used when its value is -1.

Change-Id: I4ebc49de4bf67eee5a28790cd49f0128891cc202
Reviewed-on: http://gerrit.openafs.org/9450
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsd/cm_btree.c