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

ReadMasterMoleculeList error handling of empty molecule lists #2

Open
AlistairBoettiger opened this issue Feb 2, 2014 · 0 comments

Comments

@AlistairBoettiger
Copy link
Contributor

If the target molecule list happens to be empty (size 1 byte) for some reason because the file was never fully written or otherwise corrupt, ReadMasterMoleculeList attempts to initialize an array with an impossible number of molecules / fields which will result in a computer crash:

 Version para
 Contains 1702126957 field
 Status: 1702126957
 Number of molecules in Frame 0: 543450483
 Compact Representation: 1

It would be better to return an error that the file is corrupt, the anticipated number of molecules does not match the file size, or something like that.

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

No branches or pull requests

1 participant