diff --git a/c/enc/hash.h b/c/enc/hash.h
index d993b6a..ba9b0d8 100644
--- a/c/enc/hash.h
+++ b/c/enc/hash.h
@@ -557,7 +557,6 @@
     offset = distance_offset - distance;
     limit = source_size - offset;
     limit = limit > max_length ? max_length : limit;
-    BROTLI_DCHECK(cur_ix_masked + limit <= ring_buffer_mask);
     len = FindMatchLengthWithLimit(&source[offset], &data[cur_ix_masked],
                                    limit);
     if (len >= 2) {
@@ -592,7 +591,7 @@
     limit = source_size - offset;
     limit = (limit > max_length) ? max_length : limit;
     if (distance > max_distance) continue;
-    if (best_len >= limit ||
+    if (cur_ix_masked + best_len > ring_buffer_mask || best_len >= limit ||
         /* compare 4 bytes ending at best_len + 1 */
         BrotliUnalignedRead32(&data[cur_ix_masked + best_len - 3]) !=
             BrotliUnalignedRead32(&source[offset + best_len - 3])) {
@@ -671,7 +670,8 @@
     limit = source_size - offset;
     limit = (limit > max_length) ? max_length : limit;
     if (distance > max_distance) continue;
-    if (best_len >= limit ||
+    if (cur_ix_masked + best_len > ring_buffer_mask ||
+        best_len >= limit ||
         data[cur_ix_masked + best_len] != source[offset + best_len]) {
       continue;
     }
diff --git a/c/enc/hash_forgetful_chain_inc.h b/c/enc/hash_forgetful_chain_inc.h
index 0e28b7e..9a8efeb 100644
--- a/c/enc/hash_forgetful_chain_inc.h
+++ b/c/enc/hash_forgetful_chain_inc.h
@@ -208,7 +208,6 @@
   score_t best_score = out->score;
   size_t best_len = out->len;
   size_t i;
-  BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask);
   const size_t key = FN(HashBytes)(&data[cur_ix_masked]);
   const uint8_t tiny_hash = (uint8_t)(key);
   out->len = 0;
@@ -261,7 +260,8 @@
       prev_ix = (cur_ix - backward) & ring_buffer_mask;
       slot = banks[bank].slots[last].next;
       delta = banks[bank].slots[last].delta;
-      if (prev_ix + best_len > ring_buffer_mask ||
+      if (cur_ix_masked + best_len > ring_buffer_mask ||
+          prev_ix + best_len > ring_buffer_mask ||
           /* compare 4 bytes ending at best_len + 1 */
           BrotliUnalignedRead32(&data[cur_ix_masked + best_len - 3]) !=
               BrotliUnalignedRead32(&data[prev_ix + best_len - 3])) {
diff --git a/c/enc/hash_longest_match64_inc.h b/c/enc/hash_longest_match64_inc.h
index 62d51f6..8f825de 100644
--- a/c/enc/hash_longest_match64_inc.h
+++ b/c/enc/hash_longest_match64_inc.h
@@ -170,7 +170,6 @@
   score_t best_score = out->score;
   size_t best_len = out->len;
   size_t i;
-  BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask);
   out->len = 0;
   out->len_code_delta = 0;
   /* Try last distance first. */
@@ -185,7 +184,8 @@
     }
     prev_ix &= ring_buffer_mask;
 
-    if (prev_ix + best_len > ring_buffer_mask ||
+    if (cur_ix_masked + best_len > ring_buffer_mask ||
+        prev_ix + best_len > ring_buffer_mask ||
         data[cur_ix_masked + best_len] != data[prev_ix + best_len]) {
       continue;
     }
@@ -233,7 +233,8 @@
         break;
       }
       prev_ix &= ring_buffer_mask;
-      if (prev_ix + best_len > ring_buffer_mask ||
+      if (cur_ix_masked + best_len > ring_buffer_mask ||
+          prev_ix + best_len > ring_buffer_mask ||
           /* compare 4 bytes ending at best_len + 1 */
           BrotliUnalignedRead32(&data[cur_ix_masked + best_len - 3]) !=
               BrotliUnalignedRead32(&data[prev_ix + best_len - 3])) {
diff --git a/c/enc/hash_longest_match_inc.h b/c/enc/hash_longest_match_inc.h
index 6de9ba5..c25cdb0 100644
--- a/c/enc/hash_longest_match_inc.h
+++ b/c/enc/hash_longest_match_inc.h
@@ -169,7 +169,6 @@
   score_t best_score = out->score;
   size_t best_len = out->len;
   size_t i;
-  BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask);
   out->len = 0;
   out->len_code_delta = 0;
   /* Try last distance first. */
@@ -184,7 +183,8 @@
     }
     prev_ix &= ring_buffer_mask;
 
-    if (prev_ix + best_len > ring_buffer_mask ||
+    if (cur_ix_masked + best_len > ring_buffer_mask ||
+        prev_ix + best_len > ring_buffer_mask ||
         data[cur_ix_masked + best_len] != data[prev_ix + best_len]) {
       continue;
     }
@@ -228,7 +228,8 @@
         break;
       }
       prev_ix &= ring_buffer_mask;
-      if (prev_ix + best_len > ring_buffer_mask ||
+      if (cur_ix_masked + best_len > ring_buffer_mask ||
+          prev_ix + best_len > ring_buffer_mask ||
           /* compare 4 bytes ending at best_len + 1 */
           BrotliUnalignedRead32(&data[cur_ix_masked + best_len - 3]) !=
               BrotliUnalignedRead32(&data[prev_ix + best_len - 3])) {
