Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix panic on overflowing ascii85 decode
Found this bug while fuzzing the crate The range of values that an ascii85 character can take is slightly bigger than what fits in a u32. If a, b, c, d, and e are very high, the multiplication will result in a number that cannot be represented as a u32. This should be considered as a decoding error, but the code didn't check for this case and panicked. Do the computation in a u64 instead, and try to cast it to a u32 at the very end, returning None if the value is invalid.
- Loading branch information