Kirk McKusick efe145a745 Correct assert added to dump program.
The dump program was exiting with the message:

Assertion failed: (spcl.c_count + blks < TP_NINDIR), function appendextdata, file /usr/src/sbin/dump/traverse.c, line 759.

The problem arose when dumping external attributes.

This assertion was added in this commit with no review by someone
with expertise in the dump program:

    commit 2d518c6518cdb256ff6f2c463e6b115d89c104c3
    Author:     Warner Losh <imp@FreeBSD.org>
    AuthorDate: Mon Jun 11 19:32:36 2018 +0000
    Commit:     Warner Losh <imp@FreeBSD.org>
    CommitDate: Mon Jun 11 19:32:36 2018 +0000

	Add asserts to prevent overflows of c_addr.

It is clearly wrong as the statement immediately above it in the
code which is deciding if the data will fit is:

	if (spcl.c_count + blks > TP_NINDIR)
		return (0);

As is pointed out in the bug report, the assert should be:

	(spcl.c_count + blks <= TP_NINDIR)

This commit corrects the assert. I am sorry that it took so long to
be brought to my attention and get fixed.

Reported by:  Hampton Finger
PR:           244470
MFC after:    3 days
Sponsored by: Netflix
2021-05-17 16:34:53 -07:00
..
2019-08-13 20:06:55 +00:00
2019-11-21 01:24:49 +00:00
2019-11-21 01:24:49 +00:00
2019-08-13 20:06:55 +00:00
2020-10-09 14:03:45 +00:00
2021-04-06 16:32:57 -07:00
2021-03-28 14:45:05 -04:00
2021-05-04 14:06:31 -06:00
2021-05-11 17:38:26 +02:00
2021-02-11 06:03:53 +01:00
2020-12-31 10:29:08 -05:00
2020-10-09 14:03:45 +00:00
2021-04-17 23:16:17 +02:00
2020-11-26 04:29:30 +00:00
2020-11-10 14:17:05 +00:00
2019-12-11 17:37:53 +00:00
2020-07-05 13:08:17 +00:00
2020-11-26 04:29:30 +00:00