From 79a85ae7cbec23d9590566a3e770d8e216ea3af3 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 13:47:00 +0800 Subject: Be a bit more careful handling size integer overflows and such --- http_handle_repo_raw.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'http_handle_repo_raw.go') diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go index 835dd1b..8a9740e 100644 --- a/http_handle_repo_raw.go +++ b/http_handle_repo_raw.go @@ -100,7 +100,7 @@ func httpHandleRepoRaw(writer http.ResponseWriter, request *http.Request, params files = append(files, displayTreeEntry{ Name: string(name), Mode: fmt.Sprintf("%06o", mode), - Size: int64(size), + Size: size, IsFile: typeCode == 2, IsSubtree: typeCode == 1, }) -- cgit v1.2.3