Skip to content

Fix #79756: finfo_file crash (FILEINFO_MIME) #5778

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 2 commits into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jun 29, 2020

If ctime returns NULL, in which case we must not attempt to copy
the buffer, but rather return NULL as well.

If `ctime` returns `NULL`, in which case we must not attempt to copy
the buffer, but rather return `NULL` as well.
@cmb69 cmb69 added the Bug label Jun 29, 2020
While the microsoft documentation states that "there is no error return
value", we're better safe than sorry.

We also refactor to match the already existing `NULL` handling in
`php_localtime_r()` and `php_gmtime_r()`.
@cmb69
Copy link
Member Author

cmb69 commented Jun 29, 2020

Thanks! Applied as 816b4c1.

@cmb69 cmb69 closed this Jun 29, 2020
@cmb69 cmb69 deleted the cmb/79756 branch June 29, 2020 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants