noritada / grib-rs

GRIB format parser for Rust
Apache License 2.0
57 stars 9 forks source link

Fix a panic with 'attempt to multiply with overflow' in decoding complex packing data #36

Closed noritada closed 1 year ago

noritada commented 1 year ago

This PR is a follow-up to #33 to fix a panic with 'attempt to multiply with overflow' in decoding complex packing data.

The panic was caused by reading a 3-byte parameter starting with 0x80 as a positive value instead of a negative value. For example, 0x80_cc_cc was read as 52428 instead of -52428.

Closes #34.