Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report format error for small application blocks
If the application block is smaller than 4 bytes, this is invalid (because the id is 4 bytes already), but we tried to read (length - 4) bytes anyway. This computation could overflow, so the library would try to read nearly 2^64 bytes (or 2^32 on 32-bit architectures), instead of a small number. Now a proper format error is returned. This issue was found using libfuzzer and cargo-fuzz.
- Loading branch information