github-vet / github-vet/rangeloop-pointer-findings
saracen/fpf: fpf.go; 5 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [saracen/fpf](https://www.github.com/saracen/fpf) at [fpf.go](https://github.com/saracen/fpf/blob/a315335d7da58fea0dda93cd579d89486b8b7001/fpf.go#L396-L400)
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 form is reassigned at line 399
[Click here to see the code in its original context.](https://github.com/saracen/fpf/blob/a315335d7da58fea0dda93cd579d89486b8b7001/fpf.go#L396-L400)
Click here to show the 5 line(s) of Go which triggered the analyzer.
```go
for _, form := range forms {
form.labels = make(map[*html.Node][]*html.Node)
form.options = make(map[*html.Node][]*html.Node)
p.forms[form.ID] = &form
}
```
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: a315335d7da58fea0dda93cd579d89486b8b7001
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with fpf.go lines 396-400 and read the surrounding function to understand how forms and p.forms are used. Check whether taking the address of the range variable causes entries in p.forms to reference the same value, then inspect any available project tests or validation path to confirm the intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100