Skip to content

Accept a valid path instead of an arbitrary string #4538

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

Closed
wants to merge 1 commit into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Aug 15, 2019

Since we're passing this parameter to a C function accepting a char*
without any further checking, we should reject strings with NUL bytes
in the first place.

Since we're passing this parameter to a C function accepting a `char*`
without any further checking, we should reject strings with NUL bytes
in the first place.
@nikic
Copy link
Member

nikic commented Aug 15, 2019

Won't this give a somewhat odd error message though, because it refers to paths? (Or is this actually a path?)

@cmb69
Copy link
Member Author

cmb69 commented Aug 15, 2019

You're right (no it's not a path); haven't considered the error message. Guess we should have a strlen() check with appropriate error (message) instead – is there something readily available?

@cmb69
Copy link
Member Author

cmb69 commented Aug 17, 2019

Superseeded by #4553.

@cmb69 cmb69 closed this Aug 17, 2019
@cmb69 cmb69 deleted the sqlite3-open-blob-path branch August 17, 2019 12:07
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

Successfully merging this pull request may close these issues.

2 participants