-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xz: fix a security issue for readUvarint
readUvarint could be provided a sequence of bytes where the application would never stop. That is the same issue that has been recently reported for the Go Standard Library as CVE-2020-16845. The fix simply adds a check for the number of bytes read and reports an overflow after more than 10 bytes are read, which is $\ceil{\frac{64}{7}}$. The commit also includes a test to ensure that the error is returned. I thank Github user 0xdecaf for reporting the issue.
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
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