Skip to content

Commit

Permalink
[zlib] Apply madler/zlib#898
Browse files Browse the repository at this point in the history
This fixes an incorrect assertion, see
madler/zlib#897

The PR has been accepted upstream, but isn't published as part of the
'develop' branch yet.

Bug: 1511987
Change-Id: Icedb1ff619acec63d655b54bb65d25918b7e240a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5131006
Reviewed-by: Nico Weber <[email protected]>
Auto-Submit: Hans Wennborg <[email protected]>
Commit-Queue: Nico Weber <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1238580}
NOKEYCHECK=True
GitOrigin-RevId: 1742eed8819e3862dcb4a618be1dca482908f365
  • Loading branch information
zmodem authored and copybara-github committed Dec 18, 2023
1 parent 562a437 commit beb2b58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion trees.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,8 @@ local void compress_block(deflate_state *s, const ct_data *ltree,

/* Check for no overlay of pending_buf on needed symbols */
#ifdef LIT_MEM
Assert(s->pending < (s->lit_bufsize << 1) + sx, "pendingBuf overflow");
Assert(s->pending < (s->lit_bufsize << 1) + (sx << 1),
"pendingBuf overflow");
#else
Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
#endif
Expand Down

0 comments on commit beb2b58

Please sign in to comment.