Hi, I submitted these two patches a few months ago, but it seems they got lost.
Patch 1 fixes some library Makefile variables that were changed in Gnulib. Patch 2 fixes an off-by-one error that can be seen with address sanitizer. Collin
>From a9984b13d53b990170268b4a746a9533b4b69682 Mon Sep 17 00:00:00 2001 From: Collin Funk <collin.fu...@gmail.com> Date: Wed, 11 Sep 2024 18:52:47 -0700 Subject: [PATCH 1/2] maint: Update library names used by Gnulib. * src/Makefile.am (tar_LDADD): * tests/Makefile.am (LDADD): Update library names according to Gnulib. --- src/Makefile.am | 6 +++--- tests/Makefile.am | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 10b12e3e..ea690097 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -50,7 +50,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib -I../lib AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) tar_LDADD = $(LIBS) ../lib/libtar.a ../gnu/libgnu.a\ - $(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\ - $(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) $(LIB_MBRTOWC)\ - $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \ + $(LIB_ACL) $(QCOPY_ACL_LIB) $(CLOCK_TIME_LIB) $(EUIDACCESS_LIBGEN)\ + $(GETRANDOM_LIB) $(HARD_LOCALE_LIB) $(FILE_HAS_ACL_LIB) $(MBRTOWC_LIB)\ + $(LIB_SELINUX) $(SETLOCALE_NULL_LIB) \ $(LIBINTL) $(LIBICONV) diff --git a/tests/Makefile.am b/tests/Makefile.am index 5b890b7c..b7431666 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -340,7 +340,7 @@ AM_CPPFLAGS = \ -DLOCALEDIR=\"$(localedir)\" LDADD = ../gnu/libgnu.a\ - $(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\ - $(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) $(LIB_MBRTOWC)\ - $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \ + $(LIB_ACL) $(QCOPY_ACL_LIB) $(CLOCK_TIME_LIB) $(EUIDACCESS_LIBGEN)\ + $(GETRANDOM_LIB) $(HARD_LOCALE_LIB) $(FILE_HAS_ACL_LIB) $(MBRTOWC_LIB)\ + $(LIB_SELINUX) $(SETLOCALE_NULL_LIB) \ $(LIBINTL) $(LIBICONV) -- 2.47.0
>From a6742d2ca54336f9b3c869c357c813afd0fb9c85 Mon Sep 17 00:00:00 2001 From: Collin Funk <collin.fu...@gmail.com> Date: Sat, 21 Sep 2024 22:42:42 -0700 Subject: [PATCH 2/2] Fix off-by-one error. * src/common.h (TIMESPEC_STRSIZE_BOUND): Account for NUL. --- src/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.h b/src/common.h index df87478c..c5df79f6 100644 --- a/src/common.h +++ b/src/common.h @@ -699,7 +699,7 @@ char *timetostr (time_t, char buf[SYSINT_BUFSIZE]); void code_ns_fraction (int ns, char *p); enum { BILLION = 1000000000, LOG10_BILLION = 9 }; enum { TIMESPEC_STRSIZE_BOUND = - SYSINT_BUFSIZE + LOG10_BILLION + sizeof "." - 1 }; + SYSINT_BUFSIZE + LOG10_BILLION + sizeof "." }; char const *code_timespec (struct timespec ts, char tsbuf[TIMESPEC_STRSIZE_BOUND]); struct timespec decode_timespec (char const *, char **, bool); -- 2.47.0