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

Throw exception when reading from stream fails. #3212

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

intrigus-lgtm
Copy link
Contributor

Reference Issue

#3211

What does this implement/fix? Explain your changes.

Fixes the problem that the code ignores failures when reading from a stream.
It would also have been possible to explicitly check the status of the stream after each read, but using exceptions seemed easier.

Any other comments?

There are probably other areas that have similar problems.
I only looked at this area, because it currently blocks google/oss-fuzz#3856.
Note, I don't know whether I should have moved the new struct to a different position/file.
Feel free to move it.

Code/GraphMol/MolPickler.cpp Outdated Show resolved Hide resolved
@bp-kelley
Copy link
Contributor

@intrigus-lgtm, since we are here, should we do the streamWrite as well for symmetry?

@intrigus-lgtm
Copy link
Contributor Author

@intrigus-lgtm, since we are here, should we do the streamWrite as well for symmetry?

I don't know, but I did it anyway.

@bp-kelley
Copy link
Contributor

I like it, @greglandrum what do you think?

@greglandrum
Copy link
Member

LGTM!

@greglandrum greglandrum merged commit d0b7fd9 into rdkit:master Jun 10, 2020
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