Skip to content

Conversation

@ndossche
Copy link
Member

The size of got was incorrect: it being unsigned means that the error return codes are converted from -1 to SIZE_MAX. We should use ssize_t instead.

…tory

The size of `got` was incorrect: it being unsigned means that the error
return codes are converted from -1 to SIZE_MAX. We should use ssize_t
instead.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense (maybe just in master) to stat the file to check if it is a directory in advance?

@ndossche
Copy link
Member Author

Would it make sense (maybe just in master) to stat the file to check if it is a directory in advance?

No I don't really see the point of doing that, or it should be done everywhere consistently. Note also that it would cause a potential TOC-TOU issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phar::LoadPhar undefined behavior when loading directory

2 participants