1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00
freebsd/usr.bin/diff
John Baldwin 6100374ccf 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
2022-11-15 19:17:36 -08:00
..
tests diff: tests: loosen up requirements for report_identical 2022-04-18 23:04:13 -05:00
diff.1 diff: add support for --help and --version 2022-03-10 16:17:37 +00:00
diff.c diff: Re-add void argument to usage 2022-03-10 16:24:02 +00:00
diff.h
diffdir.c diff: fix failed compare when ignoring file case 2022-02-18 15:51:38 +00:00
diffreg.c diff: Don't (ab)use sprintf() as a kind of strcat(). 2022-11-15 19:17:36 -08:00
Makefile
pr.c Fix indentation in usr.bin/diff/pr.c 2022-03-04 20:46:56 +01:00
pr.h
TODO
xmalloc.c
xmalloc.h