-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix control-byte computation at boundary sizes
`writeCtrlByte` writes the left-over value using: byte((leftOver >> (8 * i)) & 0xFF) This means that, after the `leftOver` value has been shifted, it should have a value in the [0,255] range so that the bitmask operation can work properly. Currently, because the switch case determining `leftOver` is inclusive (<=) rather than inclusive (<), the shifted `leftOver` value can reach the value of 256, making an MMDB file invalid.
- Loading branch information
1 parent
561ff78
commit 7932ea8
Showing
2 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters