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 error when parsing invalid section0 indicator #18

Merged
merged 1 commit into from
Feb 11, 2020
Merged

Throw error when parsing invalid section0 indicator #18

merged 1 commit into from
Feb 11, 2020

Conversation

measuredweighed
Copy link
Contributor

This pull request fixes the issue mentioned in #17 whereby invalid/arbitrary data would cause a panic. This change basically requires that section0's GRIB indicator be valid before allowing parsing to continue, throwing an error instead of panic-ing.

I've attached an example file from a NOAA.gov source that returned an HTML error page instead of the expected grib file, which caused the panic for us.

Copy link
Owner

@nilsmagnus nilsmagnus left a comment

Choose a reason for hiding this comment

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

LGTM

@nilsmagnus
Copy link
Owner

Thanks for the PR @measuredweighed! I will tag a new version right away.

@nilsmagnus nilsmagnus closed this Feb 11, 2020
@nilsmagnus nilsmagnus reopened this Feb 11, 2020
@nilsmagnus nilsmagnus merged commit 88c99b3 into nilsmagnus:master Feb 11, 2020
@nilsmagnus
Copy link
Owner

v1.2.4 is out now

@measuredweighed
Copy link
Contributor Author

👍 Thank you for such a quick response (and for all of your hard work on the wonderful library).

@nilsmagnus
Copy link
Owner

I had to update a test as well, so the correct version is now v1.2.5. Glad you liked the library 😄

What are you using it for if I can ask? If you dont want to answer publicly my email is nilsmagnus @ gmail.com

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

2 participants