forked from madler/zlib
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed two issues found with fuzzing.
The first fix tackles a heap overread caused by the prev_length being set to 0 under certain circumstances in deflate.c. The second issue is a 1-byte heap overflow caused by an incorrect computation of the max_block_size used in emitting stored blocks. Under certain circumstances, bi_window puts a short with (2 byte) causing the header to be 6 bytes instead of the assumed 5 and max_block_size to be 506 instead of 507.
- Loading branch information
Showing
1 changed file
with
4 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
1 comment
on commit 8352d10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
just reproduced your issue using configure and make and it is not caused by my changes.
The problem is a missing definition of HAS_SSE2
.
When compiled with cmake the defines are correct. However, when doing that with configure and make the definition of HAS_SSE2
is not set.
This change in commit 5666c2d
causes the problem:
#elif defined __x86_64__ || defined _M_AMD64
#elif defined HAS_SSE2
This PR fixes the issue in configure:
#54
This change very likely causes segfault:
when calling