github-vet / github-vet/rangeloop-pointer-findings
clockworkpi/LauncherGoDev: Menu/GameShell/10_Settings/Bluetooth/bluetooth_page.go; 28 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [clockworkpi/LauncherGoDev](https://www.github.com/clockworkpi/LauncherGoDev) at [Menu/GameShell/10_Settings/Bluetooth/bluetooth_page.go](https://github.com/clockworkpi/LauncherGoDev/blob/a48189030409a17ca785921103152f56c21da849/Menu/GameShell/10_Settings/Bluetooth/bluetooth_page.go#L707-L734)
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 v is reassigned at line 725
[Click here to see the code in its original context.](https://github.com/clockworkpi/LauncherGoDev/blob/a48189030409a17ca785921103152f56c21da849/Menu/GameShell/10_Settings/Bluetooth/bluetooth_page.go#L707-L734)
Click here to show the 28 line(s) of Go which triggered the analyzer.
```go
for i, v := range self.Devices { // v == bleapi.Device
props, err := v.GetProperties()
if err != nil {
log.Fatalf("%s: Failed to get properties: %s", v.Path, err.Error())
return
}
ni := NewNetItem()
ni.Parent = self
ni.PosX = start_x
ni.PosY = start_y + i*NetItemDefaultHeight
ni.Width = UI.Width
ni.FontObj = self.ListFontObj
ni.Path = v.Path
ni.Props = props
ni.Parent = self
ni.Device = &v
if props.Name != "" {
ni.Init(props.Name)
}else {
ni.Init(props.Address)
}
self.MyList = append(self.MyList,ni)
}
```
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: a48189030409a17ca785921103152f56c21da849
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading Menu/GameShell/10_Settings/Bluetooth/bluetooth_page.go around lines 707-734, then trace how each assigned Device is used after the loop. Verify whether the analyzer finding affects the Bluetooth menu items and determine whether the issue is a real bug or a false positive. Done means the finding is corrected or its mitigation is clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100