> On 26. Sep 2020, at 9.31, Otto Moerbeek <otto@drijf.net> wrote:
> Indeed, that commit was reverted in FreeBSD. This should do better. I
> do not like the assert FreeBSD has, so I turned into an quit().
Works for me. Thanks!
> Index: tape.c
> ===================================================================
> RCS file: /cvs/src/sbin/dump/tape.c,v
> retrieving revision 1.45
> diff -u -p -r1.45 tape.c
> --- tape.c 28 Jun 2019 13:32:43 -0000 1.45
> +++ tape.c 26 Sep 2020 06:30:37 -0000
> @@ -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++;
No comments:
Post a Comment