commit 7604762013b6859c42bc92374559d309bd0aadb6
parent f81855349a3551d98b374cdc0c58994cf0768e92
Author: Denis Kenzior <denkenz@gmail.com>
Date: Mon, 19 Aug 2024 11:39:42 -0500
eapol: Fix bogus warning
src/eapol.c:1041:9: error: ‘buf’ may be used uninitialized [-Werror=maybe-uninitialized]
1041 | l_put_be16(0, &frame->header.packet_len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This warning is bogus since the buffer is initialized through use of
eapol_frame members. EAPoL-Start is a very simple frame.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/eapol.c b/src/eapol.c
@@ -1033,7 +1033,7 @@ static void eapol_install_igtk(struct eapol_sm *sm, uint16_t igtk_key_index,
static void __send_eapol_start(struct eapol_sm *sm, bool noencrypt)
{
- uint8_t buf[sizeof(struct eapol_frame)];
+ uint8_t buf[sizeof(struct eapol_frame)] = {};
struct eapol_frame *frame = (struct eapol_frame *) buf;
frame->header.protocol_version = EAPOL_PROTOCOL_VERSION_2001;