freebsd-dev/usr.bin/diff
Alex Richardson c78f449d85 usr.bin/diff: fix UBSan error in readhash
UBSan complains about the `sum = sum * 127 + chrtran(t);` line below since
that can overflow an `int`. Use `unsigned int` instead to ensure that
overflow is well-defined.

Reviewed By:	imp
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D31075
2021-07-06 12:16:40 +01:00
..
tests diff tests: Require root for report_identical 2021-06-21 11:07:03 -04:00
diff.1 diff(1): Add EXAMPLES section 2020-06-19 06:48:16 +00:00
diff.c diff: fix incorrectly displaying files as duplicates 2021-01-25 20:38:18 +01:00
diff.h diff: remove stalled entries in headers 2021-01-27 12:18:45 +01:00
diffdir.c diff: Import fixes from OpenBSD 2018-06-09 21:09:24 +00:00
diffreg.c usr.bin/diff: fix UBSan error in readhash 2021-07-06 12:16:40 +01:00
Makefile Isolate the pr(1) related code in its own source files 2018-06-09 20:24:17 +00:00
pr.c Fix memory leak 2018-06-12 16:42:11 +00:00
pr.h Isolate the pr(1) related code in its own source files 2018-06-09 20:24:17 +00:00
TODO Update diff(1) TODO removing what has been implemented 2020-02-07 10:18:01 +00:00
xmalloc.c asprintf returns -1, not an arbitrary value < 0. Also upon error the 2020-01-14 08:18:04 +00:00
xmalloc.h