]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
OPENAFS-SA-2018-002 butc: Initialize OUT scalar value
authorBenjamin Kaduk <kaduk@mit.edu>
Thu, 30 Aug 2018 15:38:56 +0000 (10:38 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sun, 9 Sep 2018 23:35:11 +0000 (18:35 -0500)
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

src/butc/tcprocs.c

index 7154a18433110ef0ee75137010eac8549c22767f..cc19e532d524b637e4041e2fb73d84dc95130791 100644 (file)
@@ -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 */