Skip to content
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

Don't attempt to write on invalid input #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pramsey
Copy link

@pramsey pramsey commented Dec 2, 2019

Not sure what exact input causes this, but it's necessary to regress PostGIS on all platforms

Not sure what exact input causes this, but it's necessary to
regress PostGIS on all platforms
@rouault
Copy link
Member

rouault commented Dec 2, 2019

The commit message doesn't match what the code does. What are the situations where p == NULL or nmemb == 0 ?

@pramsey
Copy link
Author

pramsey commented Dec 2, 2019

Just blindly getting our software running again... postgis/postgis@00eb4b4#diff-7dca6e3da1ca13b272669d5646bcf00bL118

@r-barnes
Copy link
Contributor

This looks reasonable to me.

Copy link
Contributor

@thbeu thbeu left a comment

Choose a reason for hiding this comment

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

I'd claim this should not be merged:

  • It's not consistent throughout all I/O hook functions.
  • You can define your own hook function for FWrite to fix it on the caller side.

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.

None yet

4 participants