This package has been identified via automation as potentially impacted by upcoming Clang 16 changes. The following have been identified as potential issues: [-Werror,-Wimplicit-function-declaration] [-Werror,-Wimplicit-function-declaration] error: implicitly declaring library function 'strlcat' with type 'unsigned long (char *, const char *, unsigned long)' [-Werror,-Wimplicit-function-declaration] error: implicitly declaring library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
Created attachment 827137 [details] clang-14.log build log
Created attachment 827139 [details] clang-15.log build log
Created attachment 827141 [details] clang.diff build log
This fixes the stable branch: https://github.com/Cisco-Talos/clamav/pull/747 If for some reason it's not merged before clang-16 hits, I can always add another patch to the Gentoo package.
(In reply to Michael Orlitzky from comment #4) > This fixes the stable branch: > > https://github.com/Cisco-Talos/clamav/pull/747 > > If for some reason it's not merged before clang-16 hits, I can always add > another patch to the Gentoo package. Please do - these issues can lead to wrong configure results anyway but I also want to try clean up anything off the bug list that's fixable, as it's soooo long :(
Clang 16 is imminent.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a12c3ed66db1fed82adc8010d05214db44ac31ff commit a12c3ed66db1fed82adc8010d05214db44ac31ff Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2023-02-15 22:32:11 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2023-02-15 22:33:55 +0000 app-antivirus/clamav: add 0.103.8 (CVE-2023-20032, CVE-2023-20052). Bug: https://bugs.gentoo.org/879625 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> app-antivirus/clamav/Manifest | 1 + app-antivirus/clamav/clamav-0.103.8.ebuild | 240 +++++++++++++++++++++ .../clamav/files/clamav-0.103.8-c-std.patch | 204 ++++++++++++++++++ 3 files changed, 445 insertions(+)
*** Bug 900585 has been marked as a duplicate of this bug. ***
Apparently fixed upstream. The build now fails much more straightforwardly: FAILED: libclamav/CMakeFiles/regex.dir/regex/regexec.c.o /usr/bin/x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DTHIS_IS_LIBCLAMAV -I/usr/include/libxml2 -I/var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1_build/libclamav -I/var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamunrar_iface -I/var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/.. -I/var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1_build -I/var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav -isystem /usr/include/json-c -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -std=gnu90 -fPIC -Wall -Wextra -Wformat-security -MD -MT libclamav/CMakeFiles/regex.dir/regex/regexec.c.o -MF libclamav/CMakeFiles/regex.dir/regex/regexec.c.o.d -o libclamav/CMakeFiles/regex.dir/regex/regexec.c.o -c /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/regexec.c In file included from /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/regexec.c:81: /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c: In function ‘smatcher’: /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:219:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 219 | for (i = 1; i <= m->g->nsub; i++) | ^~ /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:226:44: error: assignment to ‘const char **’ from incompatible pointer type ‘char **’ [-Werror=incompatible-pointer-types] 226 | m->lastpos = (char **)cli_malloc((g->nplus+1) * | ^ /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:277:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 277 | for (i = 1; i < nmatch; i++) | ^ /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:278:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 278 | if (i <= m->g->nsub) | ^~ /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c: In function ‘sdissect’: /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:311:21: warning: variable ‘dp’ set but not used [-Wunused-but-set-variable] 311 | const char *dp; | ^~ In file included from /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/regexec.c:130: /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c: In function ‘lmatcher’: /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:219:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 219 | for (i = 1; i <= m->g->nsub; i++) | ^~ /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:226:44: error: assignment to ‘const char **’ from incompatible pointer type ‘char **’ [-Werror=incompatible-pointer-types] 226 | m->lastpos = (char **)cli_malloc((g->nplus+1) * | ^ /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:277:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 277 | for (i = 1; i < nmatch; i++) | ^ /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:278:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 278 | if (i <= m->g->nsub) | ^~ /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c: In function ‘ldissect’: /var/tmp/portage/app-antivirus/clamav-1.3.1/work/clamav-clamav-1.3.1/libclamav/regex/engine.c:311:21: warning: variable ‘dp’ set but not used [-Wunused-but-set-variable] 311 | const char *dp; | ^~ cc1: some warnings being treated as errors
We should track the other issue separately apparently.