Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sbin/dump Pull up following revision(s) (requested by han...
details: https://anonhg.NetBSD.org/src/rev/18a26b1087f8
branches: netbsd-8
changeset: 983815:18a26b1087f8
user: martin <martin%NetBSD.org@localhost>
date: Tue Jun 08 12:59:32 2021 +0000
description:
Pull up following revision(s) (requested by hannken in ticket #1683):
sbin/dump/tape.c: revision 1.56
Bitmaps (TS_BITS and TS_CLRI) dont use the "c_addr" array as they
cannot have holes. As bitmaps are written without TS_ADDR records
"c_count" may be larger than the "c_addr" size resulting in a
segmentation violation reading "c_addr" beyond its end.
Compute "blks" for TS_INODE and TS_ADDR only -- its used for multi
volume dumps and the bitmaps must both be on the first volume.
diffstat:
sbin/dump/tape.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 4d6f04be0759 -r 18a26b1087f8 sbin/dump/tape.c
--- a/sbin/dump/tape.c Sat Jun 05 10:58:28 2021 +0000
+++ b/sbin/dump/tape.c Tue Jun 08 12:59:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tape.c,v 1.54.8.1 2019/03/29 19:43:28 martin Exp $ */
+/* $NetBSD: tape.c,v 1.54.8.2 2021/06/08 12:59:32 martin Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95";
#else
-__RCSID("$NetBSD: tape.c,v 1.54.8.1 2019/03/29 19:43:28 martin Exp $");
+__RCSID("$NetBSD: tape.c,v 1.54.8.2 2021/06/08 12:59:32 martin Exp $");
#endif
#endif /* not lint */
@@ -328,7 +328,8 @@
}
blks = 0;
- if (iswap32(spcl.c_type) != TS_END) {
+ if (iswap32(spcl.c_type) == TS_INODE ||
+ iswap32(spcl.c_type) == TS_ADDR) {
for (i = 0; i < iswap32(spcl.c_count); i++)
if (spcl.c_addr[i] != 0)
blks++;
Home |
Main Index |
Thread Index |
Old Index