Skip to content

WIFI Shield support has some bad uses of strncpy() #6564

Open
@WestfW

Description

@WestfW

From code inspection:.. These are incorrect calls to strncpy - using the length of the source string rather than the destination buffer...

 libraries/WiFi/extras/wifiHD/src/ard_spi.c - instances of:
    strncpy(keyIdx, (const char*)&params->param, params->paramLen);

hardware/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/wl_api.h - instances of:
        strncpy(net.ssid.ssid, "My AP", strlen("My AP"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Architecture: AVRApplies only to the AVR microcontrollers (Uno, etc.)Component: CoreRelated to the code for the standard Arduino APIComponent: FirmwareLimited to the contents of the firmwares folder in the core packagesLibrary: WifiThe Wifi Arduino libraryType: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions