Skip to contentSkip to conversation

unit: test-sae: zero out frame buffers

PATCH Applied James Prestwood 2 participants 2 messages Feb 8, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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(+)
unit/test-sae.c +1 -0
index 2d984160..10367cf9 100644
@@ -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;
Signature · 1 line
2.26.2
#1 lore raw

Hi James,

Quoted 7 lines · James Prestwood

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(+)

Applied, thanks.

Regards,
-Denis