github-vet / github-vet/rangeloop-pointer-findings
MixinNetwork/kraken: engine/peer.go; 9 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [MixinNetwork/kraken](https://www.github.com/MixinNetwork/kraken) at [engine/peer.go](https://github.com/MixinNetwork/kraken/blob/3372c6f967bec9ef6ab6285be58525437c8691e8/engine/peer.go#L301-L309)
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 pair was used in a composite literal at line 303
[Click here to see the code in its original context.](https://github.com/MixinNetwork/kraken/blob/3372c6f967bec9ef6ab6285be58525437c8691e8/engine/peer.go#L301-L309)
Click here to show the 9 line(s) of Go which triggered the analyzer.
```go
for _, pair := range nack.Nacks {
logger.Verbosef("LoopRTCP(%s,%s,%s) TransportLayerNack %v\n", peer.id(), uid, sender.id, pair.PacketList())
r := &NackRequest{uid: uid, cid: sender.id, pair: &pair}
err := queueNack(timer, r)
if err != nil {
logger.Printf("LoopRTCP(%s,%s,%s) with %v\n", peer.id(), uid, sender.id, err)
return err
}
}
```
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: 3372c6f967bec9ef6ab6285be58525437c8691e8
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.