From: Daniel Salzman Date: Mon, 23 Aug 2021 07:13:21 +0000 (+0200) Subject: zone-diff: fix possible uninitialized pointer read (Coverity) X-Git-Tag: v3.3.dev~388 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4e7161e61950e22130199e119ebaeea9586ccb2;p=thirdparty%2Fknot-dns.git zone-diff: fix possible uninitialized pointer read (Coverity) --- diff --git a/src/knot/zone/zone-diff.c b/src/knot/zone/zone-diff.c index 71ce786069..cf6d8c72c0 100644 --- a/src/knot/zone/zone-diff.c +++ b/src/knot/zone/zone-diff.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 CZ.NIC, z.s.p.o. +/* Copyright (C) 2021 CZ.NIC, z.s.p.o. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -175,8 +175,8 @@ static int diff_rrsets(const knot_rrset_t *rrset1, const knot_rrset_t *rrset2, * to add all RRs that had no match, but those from second RRSet. */ /* Get RRs to add to zone and to remove from zone. */ - knot_rrset_t to_remove; - knot_rrset_t to_add; + knot_rrset_t to_remove = { 0 }; + knot_rrset_t to_add = { 0 }; if (rrset1 != NULL && rrset2 != NULL) { int ret = rdata_return_changes(rrset1, rrset2, &to_remove); if (ret != KNOT_EOK) {