Skip to content

strncpy_P doesn't zero out memory #2633

Closed
@chschu

Description

@chschu

Core Version: 2.3.0

According to the C standard, strncpy(dst, src, count) always writes exactly count bytes to dst, padding with zeroes after src has been copied.

The current implementation of strncpy_P doesn't do that, it just stops after copying src and the terminating zero. Code relying on the trailing zeroes works well with strncpy, but it doesn't work with strncpy_P.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions