Skip to content

wifi_sta_list_t should be zero'ed before use #10287

@TD-er

Description

@TD-er

Board

Any

Device Description

Hardware Configuration

Version

latest master (checkout manually)

IDE Name

PlatformIO

Operating System

Windows 11

Flash frequency

Any

PSRAM enabled

yes

Upload speed

115200

Description

As a follow-up of #10281 and as discussed with @me-no-dev

The wifi_sta_list_t struct has been extended recently and just to be sure no member is left in an undefined state, we should zero the entire struct before use.
The array of wifi_sta_info_t objects internally is filled via some get function from IDF, but I can't see if all are always filled.

wifi_sta_list_t is being used multiple times in AP.cpp, for example here:

wifi_sta_list_t clients;

Sketch

-

Debug Message

-

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions