diff options
Diffstat (limited to 'sbin/dump/tape.c')
-rw-r--r-- | sbin/dump/tape.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index c0cc1b6021d..68c1fe22435 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tape.c,v 1.45 2019/06/28 13:32:43 deraadt Exp $ */ +/* $OpenBSD: tape.c,v 1.46 2020/10/01 07:58:54 otto Exp $ */ /* $NetBSD: tape.c,v 1.11 1997/06/05 11:13:26 lukem Exp $ */ /*- @@ -330,7 +330,10 @@ flushtape(void) } blks = 0; - if (spcl.c_type != TS_END) { + if (spcl.c_type != TS_END && spcl.c_type != TS_CLRI && + spcl.c_type != TS_BITS) { + if (spcl.c_count > TP_NINDIR) + quit("c_count too large\n"); for (i = 0; i < spcl.c_count; i++) if (spcl.c_addr[i] != 0) blks++; |