All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH] unit: test-sae: zero out frame buffers
Date: Mon, 08 Feb 2021 14:23:14 -0800	[thread overview]
Message-ID: <20210208222314.618508-1-prestwoj@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

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;
-- 
2.26.2

             reply	other threads:[~2021-02-08 22:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 22:23 James Prestwood [this message]
2021-02-08 22:25 ` [PATCH] unit: test-sae: zero out frame buffers Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210208222314.618508-1-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.