cppcheck issues report
Hello. I scanned bind9 with cppcheck and found some issues. Can you explain me, which issues critical, which not?
bind-9.16.21/lib/dns/name.c:523:2: error: Uninitialized variable: odata1 [uninitvar]
SETUP_OFFSETS(name1, offsets1, odata1);
bind-9.16.21/lib/dns/name.c:524:2: error: Uninitialized variable: odata2 [uninitvar]
SETUP_OFFSETS(name2, offsets2, odata2);
bind-9.16.21/lib/dns/name.c:897:2: error: Uninitialized variable: odata [uninitvar]
SETUP_OFFSETS(name, offsets, odata);
bind-9.16.21/lib/dns/name.c:1011:2: error: Uninitialized variable: odata [uninitvar]
INIT_OFFSETS(name, offsets, odata);
bind-9.16.21/lib/dns/name.c:1096:2: error: Uninitialized variable: odata [uninitvar]
INIT_OFFSETS(name, offsets, odata);
bind-9.16.21/lib/dns/name.c:1781:2: error: Uninitialized variable: odata [uninitvar]
INIT_OFFSETS(name, offsets, odata);
bind-9.16.21/lib/dns/rdata.c:1321:2: error: There is an unknown macro here somewhere. Configuration is required. If CHECKOWNERSWITCH is a macro then please configure it. [unknownMacro]
CHECKOWNERSWITCH
bind-9.16.21/lib/dns/rdata/generic/proforma.c:17:53: error: Unmatched ')'. Configuration: ''. [syntaxError]
static inline isc_result_t fromtext_ #(ARGS_FROMTEXT) {
bind-9.16.21/lib/dns/rpz.c:583:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
bind-9.16.21/lib/dns/rpz.c:1434:44: note: Calling function 'adj_trigger_cnt', 4th argument 'NULL' value is 0
adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
bind-9.16.21/lib/dns/rpz.c:583:7: note: Null pointer dereference
if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
bind-9.16.21/lib/dns/rpz.c:597:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
bind-9.16.21/lib/dns/rpz.c:1434:44: note: Calling function 'adj_trigger_cnt', 4th argument 'NULL' value is 0
adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
^
bind-9.16.21/lib/dns/rpz.c:597:7: note: Null pointer dereference
if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
bind-9.16.21/lib/dns/rpz.c:611:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
bind-9.16.21/lib/dns/rpz.c:1434:44: note: Calling function 'adj_trigger_cnt', 4th argument 'NULL' value is 0
adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
bind-9.16.21/lib/dns/rpz.c:611:7: note: Null pointer dereference
if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
bind-9.16.21/lib/dns/zone.c:6207:20: warning: Possible null pointer dereference: addrs [nullPointer]
memmove(newaddrs, addrs, count * sizeof(*newaddrs));
bind-9.16.21/lib/dns/zone.c:1337:44: note: Calling function 'dns_zone_setparentals', 2nd argument 'NULL' value is 0
RUNTIME_CHECK(dns_zone_setparentals(zone, NULL, NULL, 0) ==
bind-9.16.21/lib/dns/zone.c:6432:34: note: Calling function 'set_serverslist', 2nd argument 'parentals' value is 0
result = set_serverslist(count, parentals, &newaddrs, NULL, &newdscps,
^
bind-9.16.21/lib/dns/zone.c:6207:20: note: Null pointer dereference
memmove(newaddrs, addrs, count * sizeof(*newaddrs));
bind-9.16.21/lib/isc/task.c:214:2: error: Uninitialized variable: task [uninitvar]
XTRACE("isc_task_create");
bind-9.16.21/lib/isc/tests/mem_test.c:368:1: error: Resource leak: f [resourceLeak]
}
bind-9.16.21/lib/dns/zone.c:6207:20: error: Null pointer dereference: addrs [ctunullpointer]
memmove(newaddrs, addrs, count * sizeof(*newaddrs));
bind-9.16.21/lib/dns/zone.c:1337:44: note: Calling function 'dns_zone_setparentals', 2nd argument 'NULL' value is 0
bind-9.16.21/lib/dns/zone.c:6432:26: note: Calling function set_serverslist, 2nd argument is null
result = set_serverslist(count, parentals, &newaddrs, NULL, &newdscps,
bind-9.16.21/lib/dns/zone.c:6207:20: note: Dereferencing argument addrs that is null
memmove(newaddrs, addrs, count * sizeof(*newaddrs));