github-vet / github-vet/rangeloop-pointer-findings
Gelembjuk/oursql: node/transactions/pending.go; 8 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [Gelembjuk/oursql](https://www.github.com/Gelembjuk/oursql) at [node/transactions/pending.go](https://github.com/Gelembjuk/oursql/blob/acf744c1df4272105f5e453af2533fb23e34a010/node/transactions/pending.go#L229-L236)
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 tx is reassigned at line 232
[Click here to see the code in its original context.](https://github.com/Gelembjuk/oursql/blob/acf744c1df4272105f5e453af2533fb23e34a010/node/transactions/pending.go#L229-L236)
Click here to show the 8 line(s) of Go which triggered the analyzer.
```go
for _, tx := range prevTXs {
u.Logger.Trace.Printf("compare input %x and previous %x", vin.Txid, tx.GetID())
if bytes.Compare(vin.Txid, tx.GetID()) == 0 {
inputTXs[vind] = &tx
exists = true
break
}
}
```
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: acf744c1df4272105f5e453af2533fb23e34a010
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.