1 From 3e1d78b2b6b0bffc255b97d40163681fb13a467a Mon Sep 17 00:00:00 2001
2 From: Donald Sharp <sharpd@cumulusnetworks.com>
3 Date: Fri, 11 Mar 2016 01:16:47 +0000
4 Subject: bgpd: Fix code path that leads to uninitialized variables
6 subtype and sublength are not initialized and if on Line 1877
7 BGP_ATTR_ENCAP != type we will not set subtype and sublength,
8 but these variables are used immediately below that if statement.
10 This issue was discovered via the freebsd compiler.
12 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
16 @@ -1870,8 +1870,8 @@ bgp_attr_encap(
22 + uint16_t subtype = 0;
23 + uint16_t sublength = 0;
24 struct bgp_attr_encap_subtlv *tlv;
26 if (BGP_ATTR_ENCAP == type) {