We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 791d3e4 commit 1fe0d48Copy full SHA for 1fe0d48
routers/repo/view.go
@@ -49,6 +49,12 @@ func renderDirectory(ctx *context.Context, treeLink string) {
49
50
start := ctx.QueryInt("start")
51
count := ctx.QueryInt("count")
52
+
53
+ // Check invalid values
54
+ if start < 0 || count < 0 || start+count > len(entries) {
55
+ start = 0
56
+ count = len(entries)
57
+ }
58
entries = entries[start : start+count]
59
60
ctx.Data["Files"], err = entries.GetCommitsInfo(ctx.Repo.Commit, ctx.Repo.TreePath)
0 commit comments