Skip to content

Commit 88e8990

Browse files
fix(trans_wifi): fix wifi buffer roundup overflow issue
1 parent ce1f593 commit 88e8990

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/trans_wifi.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "ext_sdio_adapter.h"
2323

2424
#define WIFI_NEED_SEND (BIT0)
25-
#define WIFI_SEND_BUFFER_LEN (1600)
25+
#define WIFI_SEND_BUFFER_LEN (2048)
2626
#define PP_TXCB_SCAN_PROBEREQ_ID (1)
2727

2828
typedef struct {
@@ -190,6 +190,11 @@ static void wifi_send_task(void *args)
190190
memcpy((send_buf + SIP_CTRL_HDR_LEN), (uint8_t *)(eb->u_data_start), eb->ds_head->length);
191191
}
192192

193+
if (send_len > actual_size) {
194+
ESP_LOGE(TAG, "wifi buffer overflow %" PRIu32 "-> %" PRIu32, actual_size, send_len);
195+
abort();
196+
}
197+
193198
while (1) {
194199
uint32_t num = 0;
195200
uint32_t cnt = 0;

0 commit comments

Comments
 (0)