Skip to content

Missed runtime-constraint violation error in strtok_s #3

@mnd

Description

@mnd

In the following code

*ptr = (char *) memchr (token, '\0', (size_t) s1max);
if *ptr == NULL then we should trigger slibc_call_constraint_handler.

Excerpt from standard:

Runtime-constraints:
The end of the token found shall occur within the first *s1max characters of s1 for the first call, and shall occur within the first *s1max characters of where searching resumes on subsequent calls

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