From e009f6298a641217224ec4b69f066107cf7708a4 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 8 Feb 2021 14:23:14 -0800 Subject: [PATCH] unit: test-sae: zero out frame buffers Not all the authenticate frame elements are set and were assumed to be zero. Since alloca does not memset data it needs to be done explicitly. --- unit/test-sae.c | 1 + 1 file changed, 1 insertion(+) diff --git a/unit/test-sae.c b/unit/test-sae.c index 2d984160..10367cf9 100644 --- a/unit/test-sae.c +++ b/unit/test-sae.c @@ -202,6 +202,7 @@ static size_t setup_auth_frame(struct authenticate_frame *frame, uint16_t trans, uint16_t status, const uint8_t *data, size_t len) { + memset(frame, 0, sizeof(struct authenticate_frame)); memcpy(frame->hdr.address_2, addr, 6); frame->hdr.fc.type = MPDU_TYPE_MANAGEMENT;