Skip to content

Commit

Permalink
fix(task_scheduler): possible int overflow, casting int32/64 to uint16.
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy committed Jan 14, 2025
1 parent f082931 commit f872d81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions delivery/websocket/task_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ func (s *Server) checkExpiration() { //nolint
continue
}

kind, err := strconv.Atoi(data[1])
kind, err := strconv.ParseUint(data[1], 10, 16)
if err != nil {
continue
}

if err := s.handler.DeleteByID(data[0],
types.Kind(kind)); err != nil { //nolint
types.Kind(kind)); err != nil {

Check failure on line 44 in delivery/websocket/task_scheduler.go

View workflow job for this annotation

GitHub Actions / lint

G115: integer overflow conversion uint64 -> uint16 (gosec)
failedTasks = append(failedTasks, task)
}
}
Expand Down

0 comments on commit f872d81

Please sign in to comment.