| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
sprintf fails if the result contains more than INT_MAX bytes,
so rework the code to avoid usage of sprintf %s where the
string might be longer than that.
* bootstrap.conf (gnulib_modules): Remove xvasprintf.
* src/diff.c (specify_style):
* src/util.c (begin_output):
Rewrite to avoid sprintf %s.
* src/util.c: Do not include xvasprintf.h.
(concat): Remove, as it uses sprintf %s. All uses rewritten.
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add mempcpy, stpcpy.
* src/ifdef.c (do_printf_spec):
* src/sdiff.c (expand_name, lf_snarf, temporary_file):
* src/util.c (message5):
Prefer mempcpy to memcpy plus manual size-updating.
Prefer stpcpy to mempcpy plus manual size-spec.
|
|
|
|
|
| |
* src/sdiff.c (temporary_file): Fix memory leak when mkstemp fails.
Don’t assume temporary file name length fits in ‘int’.
|
|
|
|
|
|
| |
* src/diff3.c (process_diff): Remove LAST_BLOCK arg, since callers
no longer needed it. All callers changed. This removes an
unnecessary initialization of bptr to NULL.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/cmp.c (cmp):
* src/dir.c (find_dir_file_pathname):
* src/sdiff.c (edit):
Mention which GCC bug this IF_LINT works around.
* src/diff3.c (process_diff):
Always initialize to NULL, to avoid problems on mostly-theoretical
hosts where accessing uninitialized variables traps. The next
patch will have a better fix for this.
* src/ifdef.c (do_printf_spec):
No need for IF_LINT in GCC 11.2.1.
|
|
|
|
|
|
|
|
| |
‘lint’ is for traditional lint and perhaps some other tools;
‘GCC_LINT’ is targeted more for what we do.
Gnulib accepts either, but we might as well be more accurate.
* configure.ac (GCC_LINT): Define this instead of ‘lint’.
All uses changed.
|
|
|
|
|
| |
* src/system.h (printint): Remove. All uses removed. This type
was only for porting to pre-C89 hosts, and is no longer needed.
|
|
|
|
|
| |
* src/context.c (find_function): Don’t limit function-line
searches to INT_MAX bytes, removing a FIXME.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* .gitignore: Remove lib/unused-parameter.h. Add all of m4, since
no files there need to be committed; this lets us remove
m4/.gitignore and m4/gnulib-cache.m4. Add *.orig, *.patch, .Tpo,
/*.diff, lib/*/ (which lets us remove /lib/sys/), lib/ctype.h,
lib/errno.h, lib/float.h, lib/fnmatch.h, lib/getopt-cdefs.h,
lib/getopt.h, lib/limits.h, lib/sigsegv.h, lib/stdalign.h,
lib/stdarg.h, lib/stdbool.h, lib/stddef.h, lib/stdint.h,
lib/stdopen.[ch], vc-dwim-log-*. Add slashes to autom4te.cache,
build-aux. Remove redundant initial slashes from patterns that
also have internal slashes. Remove plain ABOUT-NLS, since
/ABOUT-NLS suffices. Sort using LC_ALL=C.
|
|
|
|
| |
* src/util.c (debug_script): Compile only if DEBUG.
|
|
|
|
|
|
|
|
| |
* lib/Makefile.am (noinst_HEADERS): Remove prepargs.h.
(libdiffutils_a_SOURCES): Remove prepargs.c.
* lib/prepargs.c, lib/prepargs.h: Remove. Hasn’t been
needed for many years.
* src/diff.c: Do not include prepargs.h.
|
|
|
|
|
| |
* src/util.c (zalloc): Remove. All uses replaced
by xzalloc, which means the same thing.
|
|
|
|
|
|
|
|
| |
* src/diff3.c: Add pragma to suppress -Wanalyzer-null-dereference
alarms.
* src/diff.h (find_dir_file_pathname): Add malloc-related
attributes, to pacify gcc -Wsuggest-attribute=malloc.
|
|
|
|
|
| |
* configure.ac: Don’t add -Wno-analyzer-null-argument, since
the issue is now fixed in Gnulib.
|
| |
|
|
|
|
|
|
| |
* init.cfg: Remove. I guess this file was a stray, since it was a
copy of tests/init.cfg when it was checked in, and it hasn’t been
maintained since.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/init.cfg (stderr_fileno_): Reject valgrind if it reports a
"Serious error" on a trival use of ‘diff’. Without this patch, on
RHEL 8.4 when I compile diffutils with a GCC 11.2.0 that I built
myself, ‘valgrind diff’ spits out messages like WARNING: Serious
error when reading debug info / When reading debug info from diff:
Ignoring non-Dwarf2/3/4 block in .debug_info’ and this causes the
strip-trailing-cr test to fail. I guess valgrind complains
because the valgrind version 3.16.0 that came with RHEL 8.4 cannot
grok the debug entries generated by GCC 11.2.0.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
[This *is* useful, so reapply. ]
When comparing buffers a word at a time, cmp could read up to
sizeof (word) - 1 uninitialized bytes.
* src/cmp.c (cmp): Set not just a single guaranteed-differing
sentinel byte just beyond any final read byte, but also ensure
that any following bytes are defined, if those may be read via
block_compare's word-at-a-time comparison. Reported by Bruno Haible
in https://lists.gnu.org/r/diffutils-devel/2021-07/msg00003.html
|
|
|
|
|
|
| |
One or both of the sentinel bytes were copies of uninitialized values.
* src/cmp.c (cmp): Use arbitrary initialized values for the
sentinel bytes.
|
|
|
|
| |
It did not solve the problem. The next patch does.
|
|
|
|
|
|
|
|
|
|
| |
When comparing buffers a word at a time, cmp could read up to
sizeof (word) - 1 uninitialized bytes.
* src/cmp.c (cmp): Set not just a single guaranteed-differing
sentinel byte just beyond any final read byte, but also ensure
that any following bytes are defined, if those may be read via
block_compare's word-at-a-time comparison. Reported by Bruno Haible
in https://lists.gnu.org/r/diffutils-devel/2021-07/msg00003.html
|
| |
|
|
|
|
|
|
| |
* src/diff.c (option_help_msgid): Reword --color help without
using the confusing word “default”. Problem reported
by Peter Oliver (Bug#48532).
|
| |
|
|
|
|
|
|
| |
* src/diff.c (usage): Prefer &"string"[N] to "string" + N.
Some compilers complain about the latter, as they worry C++
refugees will think it’s string concatnation.
|
|
|
|
|
|
|
| |
* src/diff3.c (main): Avoid signed integer overflow in the very
unlikely case of more than INT_MAX incompatible options. Instead,
use one bit to record the presence of each type of incompatible
option, and report an error if more than one bit is set.
|
|
|
|
|
|
| |
* configure.ac (WERROR_CFLAGS): Don’t bother with
-Wno-return-local-addr as it doesn’t seem to work.
Anyway, it’s no longer needed on Ubuntu 20.10.
|
|
|
|
|
|
| |
* configure.ac (WERROR_CFLAGS): Disable -Wstack-protector, as it
has a false alarm with lib/vasnprintf.c on Ubuntu 20.10 and it’s
not worth working around. Coreutils already disables it.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Than (Bug#47362).
Fix the bug by using xmalloca instead of vararrays.
* bootstrap.conf (gnulib_modules): Add xmalloca; remove vararrays.
* configure.ac: Remove AC_C_VARARRAYS.
* src/ifdef.c: Include xmalloca.h instead of xalloc.h.
(do_printf_spec): Use xmalloca instead of an xmalloc
that lacks a corresponding ‘free’ if HAVE_C_VARARRAYS
due to a typo in 2017-05-18T05:51:31Z!meyering@fb.com.
|
| |
|
|
|
|
|
| |
* configure.ac: Do not use -Wreturn-local-addr in Gnulib,
to suppress a false alarm in vasnprintf.c.
|
|
|
|
|
|
|
| |
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
|
|
|
|
| |
* configure.ac: Require 2.64, up from 2.63, to align with gnulib.
|
| |
|
|
|
|
|
|
|
|
|
| |
* man/Makefile.am $(dist_man1_MANS): Adjust sed substitution
to also remove the space after "GNU". This avoids the single
leading space on each man page title line. I'm guessing that
interfered with indexing/searching, causing "man -k diff3" to
print this: diff3 (1) - (unknown subject).
Reported by Dan Jacobon in http://bugs.gnu.org/39769.
|
|
|
|
|
|
|
| |
* doc/diffutils.texi (Unified Format): Correct the now
seriously outdated "At present" (referring to early 1990s)
statement to be more of a historical note.
Reported by Roland Illig in http://bugs.gnu.org/39184.
|
|
|
|
|
|
|
| |
* man/Makefile.am (dist_man1_MANS): Elide "GNU " prefix
from the generated prog+one-line-summary, so that help2man
uses the program name rather than "GNU" as the nroff "name".
Reported by Dan Jacobson in http://bugs.gnu.org/38574.
|
|
|
|
|
|
|
| |
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Use getopt-gnu, rather than
obsolete "getopt" module. Use nstrftime in place of strftime.
(avoided_gnulib_modules): Do not avoid the "lock" module. That
would lead to a build failure due to "glthread/lock.h not found".
|
|
|
|
| |
* po/POTFILES.in: Add argmatch.h; remove xstrtol-error.c
|
|
|
|
|
|
|
| |
* configure.ac (GNULIB_WARN_CFLAGS): Disable -Wduplicated-branches
and -Wreturn-local-addr, due to a couple of false-positive warnings.
(WARN_CFLAGS): Reenable many warnings that now (with recent gcc)
provoke no false positive.
|
|
|
|
|
| |
* bootstrap.conf (avoided_gnulib_modules): Also --avoid=lock-tests
to avoid gnulib-related build failure.
|
|
|
|
|
|
| |
* gnulib: Update submodule to latest.
* bootstrap: Copy from gnulib.
* tests/init.sh: Likewise.
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (buildreq): Require at least autoconf 2.62,
up from 2.61, just as grep and coreutils do.
(bootstrap_post_import_hook): "Copy pkg-config's pkg.m4 ...",
copied from grep's bootstrap.conf.
(avoided_gnulib_modules): Pull this definition to the top.
Formatting.
|
|
|
|
|
| |
* tests/cmp: New test case (Bug#37558).
Copyright-paperwork-exempt: yes
|
|
|
|
|
|
| |
Problem reported by Dave Odell (Bug#37558).
* src/cmp.c (cmp): Treat negative ‘bytes’ as infinite, fixing a
bug introduced in the 2019-08-27 patch that fixed Bug#35256.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by alec (Bug#35256).
* NEWS: Mention the fix.
* bootstrap.conf (gnulib_modules): Use strtoimax and xstrtoimax,
not strtoumax and strtoumax.
* src/cmp.c (bytes): Now signed, with -1 representing no limit.
All uses changed.
* src/cmp.c (specify_ignore_initial, main):
* src/diff.c (main):
* src/ifdef.c (format_group):
* src/sdiff.c (interact):
Use strtoimax, not strtoumax.
|