summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-03-31 02:01:11 +0000
committerpfg <pfg@FreeBSD.org>2016-03-31 02:01:11 +0000
commitf481e13a8863aec8187b761b50d516aae13a3941 (patch)
tree8d488056a6c0aec87e26990588f9133f6a157c07
parent43026a8c5f3992c2140300a95f5feb9d2b0802a5 (diff)
downloadFreeBSD-src-f481e13a8863aec8187b761b50d516aae13a3941.zip
FreeBSD-src-f481e13a8863aec8187b761b50d516aae13a3941.tar.gz
restore(8): fix use of uninitialized value.
Prevent uninitialized use of scalar newvol when jumping to gethdr. CID: 1006491
-rw-r--r--sbin/restore/tape.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index 7a60cf4..2f97231 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -340,6 +340,7 @@ getvol(long nextvol)
}
if (volno == 1)
return;
+ newvol = 0;
goto gethdr;
}
again:
OpenPOWER on IntegriCloud