summaryrefslogtreecommitdiff
path: root/net/sunrpc
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2011-04-13 14:31:31 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-04-13 15:12:23 -0400
commitc3dfc2808ab82b13f8b6db62189da959c2eadeea (patch)
tree5eb6f11f712396e67544539a4a28d4503d54a6b9 /net/sunrpc
parent9b7160c55a41dd2fec3d467f979e55782d3f92ad (diff)
NFS: Use correct variable for page bounds checking
While decoding a secinfo reply, I store the list of supported sec flavors on a page accessible through res->flavors. Before reading each new flavor, I do some math to determine if there is enough space left on this page, and I break out of my read look if there isn't. In order to perform this check correctly, I need to use the address of res->flavors, rather than the address of res. When this loop was broken early I lied to the caller and told them that the entire list had been decoded. This could lead to problems if the caller tries to use any the garbage data claiming to be a valid sec flavor. I fixed this by using res->flavors->num_flavors as a counter, incrementing it every time a sec flavor is successfully decoded. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
0 files changed, 0 insertions, 0 deletions