Thanks to visit codestin.com
Credit goes to github.com

Skip to content

unsafe functions used to store error message #174

@ghost

Description

The code uses strcpy to write data in an error buffer passed at runtime, but there is no way for the caller to know the buffer size that will be needed.
Using this feature is thus insecure, even if it can be worked around by using absurdly large buffers.

The strncpy function would require C99, same for memcpy. I do not know if C98 have any way of doing this safely.

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