The new reports are:
./lib/rules/api.c:301:3: warning: Memory copy function overflows destination buffer
memcpy(key_data_ruleset_end, &KEY_EXACT_MATCH, sizeof(KEY_EXACT_MATCH));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./lib/rules/api.c:506:2: warning: Memory copy function overflows destination buffer
memcpy(key.data, &KEY_EXACT_MATCH, sizeof(KEY_EXACT_MATCH));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./lib/rules/api.c:699:2: warning: Memory copy function overflows destination buffer
memcpy(key.data, &KEY_ZONELIKE_A, sizeof(KEY_ZONELIKE_A));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
I re-checked those places, and I believe they can never overflow.
I regularly run with ASAN as well, which would catch overflows.
I can't see a simple way of amending the code in a way
that the linter might be happy.
script:
- export SCANBUILD="$(realpath ./scripts/run-scanbuild-with-args.sh)"
- ninja -C build_ci* scan-build || true
- - test "$(ls build_ci*/meson-logs/scanbuild/*/report-*.html | wc -l)" = 21 # we have this many errors ATM :-)
+ - test "$(ls build_ci*/meson-logs/scanbuild/*/report-*.html | wc -l)" = 24 # we have this many errors ATM :-)
lint:tidy:
<<: *after_build