github-vet / github-vet/rangeloop-pointer-findings
slaveofcode/voodio: web/handler/movie_group.go; 6 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [slaveofcode/voodio](https://www.github.com/slaveofcode/voodio) at [web/handler/movie_group.go](https://github.com/slaveofcode/voodio/blob/39eb5f796e6e6e4dc0d9146d66e5337fe5c68fe0/web/handler/movie_group.go#L36-L41)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to mov was used in a composite literal at line 39
[Click here to see the code in its original context.](https://github.com/slaveofcode/voodio/blob/39eb5f796e6e6e4dc0d9146d66e5337fe5c68fe0/web/handler/movie_group.go#L36-L41)
Click here to show the 6 line(s) of Go which triggered the analyzer.
```go
for _, mov := range groupMovies {
movies = append(movies, movieResp{
Movie: mov,
Subtitles: getSubMovieInfos(db, &mov),
})
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 39eb5f796e6e6e4dc0d9146d66e5337fe5c68fe0
Contributor guide
No contributing guide indexed for this repository
Research direction
Open web/handler/movie_group.go at lines 36-41 and inspect how mov is passed to movieResp and getSubMovieInfos. Confirm whether the range-loop reference is unsafe, then classify the finding as Bug, Mitigated, or Desirable Behavior; the issue names no test or remediation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100