File tree Expand file tree Collapse file tree 7 files changed +8
-8
lines changed
Expand file tree Collapse file tree 7 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -545,7 +545,7 @@ static BROTLI_INLINE void FindCompoundDictionaryMatch(
545545 source = (const uint8_t * )BROTLI_UNALIGNED_LOAD_PTR ((const uint8_t * * )tail );
546546 }
547547
548- BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask );
548+ BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask + 1 );
549549
550550 for (i = 0 ; i < 4 ; ++ i ) {
551551 const size_t distance = (size_t )distance_cache [i ];
@@ -656,7 +656,7 @@ static BROTLI_INLINE size_t FindAllCompoundDictionaryMatches(
656656 source = (const uint8_t * )BROTLI_UNALIGNED_LOAD_PTR ((const uint8_t * * )tail );
657657 }
658658
659- BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask );
659+ BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask + 1 );
660660
661661 while (item == 0 ) {
662662 size_t offset ;
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
213213 out -> len = 0 ;
214214 out -> len_code_delta = 0 ;
215215
216- BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask );
216+ BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask + 1 );
217217
218218 /* Try last distance first. */
219219 for (i = 0 ; i < NUM_LAST_DISTANCES_TO_CHECK ; ++ i ) {
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
178178 out -> len = 0 ;
179179 out -> len_code_delta = 0 ;
180180
181- BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask );
181+ BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask + 1 );
182182
183183 /* Try last distance first. */
184184 for (i = 0 ; i < (size_t )self -> num_last_distances_to_check_ ; ++ i ) {
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
195195 out -> len = 0 ;
196196 out -> len_code_delta = 0 ;
197197
198- BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask );
198+ BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask + 1 );
199199
200200 /* Try last distance first. */
201201 for (i = 0 ; i < (size_t )self -> num_last_distances_to_check_ ; ++ i ) {
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
178178 out -> len = 0 ;
179179 out -> len_code_delta = 0 ;
180180
181- BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask );
181+ BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask + 1 );
182182
183183 /* Try last distance first. */
184184 for (i = 0 ; i < (size_t )self -> num_last_distances_to_check_ ; ++ i ) {
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
165165 size_t cached_backward = (size_t )distance_cache [0 ];
166166 size_t prev_ix = cur_ix - cached_backward ;
167167
168- BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask );
168+ BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask + 1 );
169169
170170 out -> len_code_delta = 0 ;
171171 if (prev_ix < cur_ix ) {
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
170170 out -> len = 0 ;
171171 out -> len_code_delta = 0 ;
172172
173- BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask );
173+ BROTLI_DCHECK (cur_ix_masked + max_length <= ring_buffer_mask + 1 );
174174
175175 /* Try last distance first. */
176176 for (i = 0 ; i < (size_t )self -> num_last_distances_to_check_ ; ++ i ) {
You can’t perform that action at this time.
0 commit comments