If SDISK_SendFail fails before the pathname to the temporary file
has been constructed, then the failure handler will unlink stack
garbage, with variable results.
Initialise the string, and check to see if it has contents before
calling unlink
Reviewed-on: http://gerrit.openafs.org/9299
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit
44e806431bec3149a78127f5d1003e84e3a0b072)
Change-Id: I366de3ce15a5e1ea855eb45110ff7acf1748c377
Reviewed-on: http://gerrit.openafs.org/9538
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
/* send the file back to the requester */
dbase = ubik_dbase;
+ pbuffer[0] = '\0';
if ((code = ubik_CheckAuth(rxcall))) {
DBHOLD(dbase);
failed:
if (code) {
#ifndef OLD_URECOVERY
- unlink(pbuffer);
+ if (pbuffer[0] != '\0')
+ unlink(pbuffer);
/* Failed to sync. Allow reads again for now. */
if (dbase != NULL) {
tversion.epoch = epoch;