opnsense-src/usr.bin/diff
John Baldwin a8b6a13b0a diff: Don't (ab)use sprintf() as a kind of strcat().
Previously print_header() used sprintf() of a buffer to itself as a
kind of string builder but without checking for overflows.  This
raised -Wformat-truncation and -Wrestrict warnings in GCC.  Instead,
just conditionally print the new timestamp fields after the initial
strftime()-formatted string.  While here, use sizeof(buf) with
strftime() rather than a magic number.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D36814

(cherry picked from commit 6100374ccf)
2023-01-23 21:12:44 -08:00
..
tests diff: tests: loosen up requirements for report_identical 2022-04-21 17:38:00 -05: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-02-01 14:05:25 +01:00
diff.h diff: remove stalled entries in headers 2021-05-05 10:37:08 +02:00
diffdir.c
diffreg.c diff: Don't (ab)use sprintf() as a kind of strcat(). 2023-01-23 21:12:44 -08:00
Makefile
pr.c Fix indentation in usr.bin/diff/pr.c 2022-03-12 19:18:32 +01:00
pr.h
TODO
xmalloc.c
xmalloc.h