]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
[bug] fix 5193822305648640 and 4673544697806848
authorArjun Singh <ajsinghyadav00@gmail.com>
Mon, 7 Aug 2023 11:31:45 +0000 (17:01 +0530)
committerVincent Bernat <vincent@bernat.ch>
Fri, 15 Sep 2023 08:00:23 +0000 (10:00 +0200)
Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
src/daemon/protocols/lldp.c
tests/fuzz_edp.c

index 4f689a0cb0674ecaff2cb053b7b888a45bfcd90e..23211f8e44f2c9885749eb60819f4cba4edc4eeb 100644 (file)
@@ -614,7 +614,7 @@ lldp_decode(struct lldpd *cfg, char *frame, int s, struct lldpd_hardware *hardwa
 #endif
        struct lldpd_mgmt *mgmt;
        int af;
-       u_int8_t addr_str_length, addr_str_buffer[32];
+       u_int8_t addr_str_length, addr_str_buffer[32] = { 0 };
        u_int8_t addr_family, addr_length, *addr_ptr, iface_subtype;
        u_int32_t iface_number, iface;
        int unrecognized;
index 76d1253a01eb8816fafeaec4e4c1861dc30125b9..e82e5331a0d5ba238c95c814a5bfcac642b85f1e 100644 (file)
@@ -32,6 +32,7 @@ LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
 
        struct lldpd cfg;
        cfg.g_config.c_mgmt_pattern = NULL;
+       cfg.g_config.c_tx_hold = LLDPD_TX_HOLD;
 
        struct lldpd_chassis *nchassis = NULL;
        struct lldpd_port *nport = NULL;