Skip to content

Accept a valid path instead of an arbitrary string - #4538

Closed
cmb69 wants to merge 1 commit into
php:masterfrom
cmb69:sqlite3-open-blob-path
Closed

Accept a valid path instead of an arbitrary string#4538
cmb69 wants to merge 1 commit into
php:masterfrom
cmb69:sqlite3-open-blob-path

Conversation

@cmb69

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@cmb69

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

Superseeded by #4553.

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

@cmb69@nikic