Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
[nrf noup] zephyr: Fix message buffer length
Browse files Browse the repository at this point in the history
fixup! [nrf noup] Monitor supplicant state and inform applications

The incoming message is payload + length, so, need to include size of
the "length" field.

Fixes SHEL-2250.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 committed Dec 5, 2023
1 parent 07f1537 commit 163da14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wpa_supplicant/wpa_cli_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static void wpa_cli_close_connection(struct wpa_supplicant *wpa_s)
static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl)
{
while (wpa_ctrl_pending(ctrl) > 0) {
char buf[MAX_CTRL_MSG_LEN];
char buf[sizeof(struct conn_msg)];
size_t len = sizeof(buf) - 1;

if (wpa_ctrl_recv(ctrl, buf, &len) == 0) {
Expand Down

0 comments on commit 163da14

Please sign in to comment.