Don't trust # of entries from ListAttributes
ListAttributes returns the number of entries in its array as an RPC
argument. But, we can't trust this, as it could be manipulated and
end up pointing past the end of the returned array (which is counted,
so the entries argument is actually pointless).
Add bounds checking to the functions which use this value to prevent
this problem.
(cherry picked from commit
8992210f27671673a89a541776aa105238ad14cf)
Reviewed-on: http://gerrit.openafs.org/3597
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Change-Id: I318f2f956a48f10e91590ad9f28fab868d8ceb60
Reviewed-on: http://gerrit.openafs.org/4134
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>