TC_ReadLabel (backup readlabel) does not initialize its output buffer
completely. It leaks butc memory contents over the wire:
struct tc_tapeLabel
- up to 32 bytes from member afsname (TC_MAXTAPELEN 32)
- up to 32 bytes from member pname (TC_MAXTAPELEN 32)
Initialize the buffer.
[kaduk@mit.edu: move initialization to the RPC stub]
(cherry picked from commit
52f4d63148323e7d605f9194ff8c1549756e654b)
Change-Id: Ia5d9dd649bdbd45c8b201f344bf55080a55e3392
{
afs_int32 code;
+ memset(label, 0, sizeof(*label));
#ifdef xbsa
if (CONF_XBSA)
return (TC_BADTASK); /* ReadLabel does not apply if XBSA */