]> git.proxmox.com Git - mirror_frr.git/commitdiff
eigrpd: Clean up some new coverity issues
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 31 Aug 2017 17:01:35 +0000 (13:01 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 5 Sep 2017 22:56:40 +0000 (18:56 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
eigrpd/eigrp_packet.c

index 8a7d4d958714aed4b41ff8cda2e52b79292e2562..d2bff74a54d18c5fa84cf9162c3220d44fa4ce6b 100644 (file)
@@ -272,6 +272,7 @@ int eigrp_make_sha256_digest(struct eigrp_interface *ei, struct stream *s,
        if (!key) {
                zlog_warn("Interface %s: Expected key value not found in config",
                          ei->ifp->name);
+               eigrp_authTLV_SHA256_free(auth_TLV);
                return 0;
        }
 
@@ -622,8 +623,8 @@ int eigrp_read(struct thread *thread)
        if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV)) {
                char src[PREFIX_STRLEN], dst[PREFIX_STRLEN];
 
-               strncpy(src, inet_ntoa(iph->ip_src), PREFIX_STRLEN);
-               strncpy(dst, inet_ntoa(iph->ip_dst), PREFIX_STRLEN);
+               strlcpy(src, inet_ntoa(iph->ip_src), sizeof(src));
+               strlcpy(dst, inet_ntoa(iph->ip_dst), sizeof(dst));
                zlog_debug("Received [%s][%d/%d] length [%u] via [%s] src [%s] dst [%s]",
                           lookup_msg(eigrp_packet_type_str, opcode, NULL),
                           ntohl(eigrph->sequence), ntohl(eigrph->ack), length,