Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed runtime-constraint violation error in strtok_s #3

Open
mnd opened this issue Apr 4, 2019 · 0 comments
Open

Missed runtime-constraint violation error in strtok_s #3

mnd opened this issue Apr 4, 2019 · 0 comments

Comments

@mnd
Copy link

mnd commented Apr 4, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant