aboutsummaryrefslogtreecommitdiff
path: root/internal/format
diff options
context:
space:
mode:
Diffstat (limited to 'internal/format')
-rw-r--r--internal/format/packfile/delta/apply.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/format/packfile/delta/apply.go b/internal/format/packfile/delta/apply.go
index d0918839..4210d1b3 100644
--- a/internal/format/packfile/delta/apply.go
+++ b/internal/format/packfile/delta/apply.go
@@ -6,6 +6,11 @@ import (
"lindenii.org/go/lgo/intconv"
)
+// MaxChainDepth is the maximum supported delta chain length.
+// Resolvers reject chains deeper than this
+// to bound recursion depth and reconstruction work.
+const MaxChainDepth = 1 << 12
+
// Apply applies one inflated delta payload to base
// and returns the reconstructed result.
//