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 2831f6c commit 0f0f820Copy full SHA for 0f0f820
1 file changed
src/code/handler.go
@@ -33,6 +33,10 @@ func parseRange(r string) (int64, int64, error) {
33
return 0, 0, err
34
}
35
36
+ if sz := endPos + 1 - beginPos; sz <= 0 || sz > 50*1024*1024 {
37
+ return 0, 0, fmt.Errorf("invalid range: %s", r)
38
+ }
39
+
40
return beginPos, endPos + 1, nil
41
42
0 commit comments