Skip to content

Commit 36d40c1

Browse files
Potential fix for pull request finding 'CodeQL / Incorrect conversion between integer types'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent d259596 commit 36d40c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • cmd/zoekt-sourcegraph-indexserver

cmd/zoekt-sourcegraph-indexserver/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ func (s *Server) handleRoot(w http.ResponseWriter, r *http.Request) {
852852
// ?id=
853853
indexMsg := ""
854854
if v := values.Get("id"); v != "" {
855-
id, err := strconv.Atoi(v)
855+
id, err := strconv.ParseUint(v, 10, 32)
856856
if err != nil {
857857
http.Error(w, err.Error(), http.StatusBadRequest)
858858
return

0 commit comments

Comments
 (0)