Skip to content

wifi_ap_record_t should be zero'ed before use #10286

Closed
@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_ap_record_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 just as has been done in PR #10282

Suggested fix, to zero all of _scanResult right after this line:

WiFiScanClass::_scanResult = new wifi_ap_record_t[WiFiScanClass::_scanCount];

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