afs: do not leak stale data in buffers 59/12459/2
authorBenjamin Kaduk <kaduk@mit.edu>
Mon, 7 Nov 2016 05:29:22 +0000 (23:29 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 30 Nov 2016 17:20:58 +0000 (12:20 -0500)
commita26c5054ee501ec65db3104f6a6a0fef634d9ea7
tree404793a383fecaa9e3cbeb185eb04fdf0dfa73ab
parent70065cb1831dbcfd698c8fee216e33511a314904
afs: do not leak stale data in buffers

Similar to the previous commit, zero out the buffer when fetching
a new slot, to avoid the possibility of leaving stale data in
a reused buffer.

We are not supposed to write such stale data back to a fileserver,
but this is an extra precaution in case of bugs elsewhere -- memset
is not as expensive as it was in the 1980s.

Change-Id: I344e772e9ec3d909e8b578933dd9c6c66f0a8cf6
Reviewed-on: https://gerrit.openafs.org/12459
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/afs_buffer.c