Skip to content

Potential buffer overflow #23

@megakilo

Description

@megakilo

In the endpoints.c file, there are a lot of strncat calls.
For example: strncat(rsp, ">;", len);
The third parameter should be the max length to be appended from the string at the second parameter. So it should not be "len".
Also to avoid buffer overflow, I think it should be:
strncat(rsp, ">;", len-strlen(rsp)); //len is already the buffer size without \0

Is my understanding right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions