From: Benjamin Kaduk Date: Thu, 30 Aug 2018 15:38:56 +0000 (-0500) Subject: OPENAFS-SA-2018-002 butc: Initialize OUT scalar value X-Git-Tag: upstream/1.8.2^2~13 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=418b2ab56c60e44375df31a3a8f77461d577a5ff;p=packages%2Fo%2Fopenafs.git OPENAFS-SA-2018-002 butc: Initialize OUT scalar value In STC_ReadLabel, the interaction with the tape device is synchronous, so there is no need to allocate a task ID for status monitoring. However, we do need to initialize the output value, to avoid writing stack garbage on the wire. (cherry picked from commit f5a80115f8f7f9418287547f0fc7fdb13d936f00) Change-Id: I3f5ea1cfff0d04adb49cdca7b05ac869665660e5 --- diff --git a/src/butc/tcprocs.c b/src/butc/tcprocs.c index 7154a1843..cc19e532d 100644 --- a/src/butc/tcprocs.c +++ b/src/butc/tcprocs.c @@ -373,6 +373,8 @@ STC_ReadLabel(struct rx_call *acid, struct tc_tapeLabel *label, afs_uint32 *task afs_int32 code; memset(label, 0, sizeof(*label)); + /* Synchronous, so no "real" ID; don't send stack garbage on the wire */ + *taskId = 0; #ifdef xbsa if (CONF_XBSA) return (TC_BADTASK); /* ReadLabel does not apply if XBSA */