We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The functions strcpy and strcat are generally regarded as unsafe as they do not check the length of the buffer they are writing into. I don't know if the current uses in https://github.com/search?q=repo%3Afyne-io%2Ffyne%20strcpy&type=code and https://github.com/search?q=repo%3Afyne-io%2Ffyne%20strcpy&type=code can be abused in any way (I couldn't see something strange at first glance) but it does not hurt to stay on the safe side.
strcpy
strcat
We should try to replace these with strlcpy and strlcat respectfully assuming that they exist.
Yes, assuming that the improved APIs exist in the Android c-library.
Replace functions with strlcat and strlcpy to avoid potential issues with writing outside of buffers.
strlcat
strlcpy
The text was updated successfully, but these errors were encountered:
We should likely also replace strdup with strndup for extra safety: https://github.com/search?q=repo%3Afyne-io%2Ffyne+strdup&type=code
strdup
strndup
Sorry, something went wrong.
No branches or pull requests
Checklist
Is your feature request related to a problem?
The functions
strcpy
andstrcat
are generally regarded as unsafe as they do not check the length of the buffer they are writing into. I don't know if the current uses in https://github.com/search?q=repo%3Afyne-io%2Ffyne%20strcpy&type=code and https://github.com/search?q=repo%3Afyne-io%2Ffyne%20strcpy&type=code can be abused in any way (I couldn't see something strange at first glance) but it does not hurt to stay on the safe side.We should try to replace these with strlcpy and strlcat respectfully assuming that they exist.
Is it possible to construct a solution with the existing API?
Yes, assuming that the improved APIs exist in the Android c-library.
Describe the solution you'd like to see.
Replace functions with
strlcat
andstrlcpy
to avoid potential issues with writing outside of buffers.The text was updated successfully, but these errors were encountered: