github-vet / github-vet/rangeloop-pointer-findings
ilyaran/BClient: main.go; 10 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [ilyaran/BClient](https://www.github.com/ilyaran/BClient) at [main.go](https://github.com/ilyaran/BClient/blob/394b3b05ed228a641fe75a6526c5a8148cd29406/main.go#L220-L229)
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 vv is reassigned at line 224
[Click here to see the code in its original context.](https://github.com/ilyaran/BClient/blob/394b3b05ed228a641fe75a6526c5a8148cd29406/main.go#L220-L229)
Click here to show the 10 line(s) of Go which triggered the analyzer.
```go
for _,vv:=range blocks.Blocks{
InnerLoop:
for _,vvv:=range vv.Tx {
if vvv.Hash==v.transactionHash{
block=&vv
break OuterLoop
break InnerLoop
}
}
}
```
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: 394b3b05ed228a641fe75a6526c5a8148cd29406
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with main.go lines 220-229 at commit 394b3b05ed228a641fe75a6526c5a8148cd29406 and inspect the reported range-loop reference. Compare the behavior with the linked classification descriptions, then react with Bug, Mitigated, or Desirable Behavior; completion is the selected classification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100