github-vet / github-vet/rangeloop-pointer-findings
renproject/shamir: vss.go; 4 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [renproject/shamir](https://www.github.com/renproject/shamir) at [vss.go](https://github.com/renproject/shamir/blob/4bbf85e33bd4851c359528484635b76d1edab4a5/vss.go#L377-L380)
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.
> function call at line 378 passes reference to coeff to third-party code
[Click here to see the code in its original context.](https://github.com/renproject/shamir/blob/4bbf85e33bd4851c359528484635b76d1edab4a5/vss.go#L377-L380)
Click here to show the 4 line(s) of Go which triggered the analyzer.
```go
for i, coeff := range coeffs {
hPow.Scale(&h, &coeff)
(*c)[i].Add(&(*c)[i], &hPow)
}
```
Click here to show extra information the analyzer produced.
```
No path was found through the callgraph that could lead to a function which writes a pointer argument.
The following graphviz dot graph describes paths through the callgraph that could lead to a function which passes a pointer to third-party code:
digraph G {
"(Scale, 2)" -> {}
}
```
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: 4bbf85e33bd4851c359528484635b76d1edab4a5
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with vss.go lines 377-380 in the referenced renproject/shamir commit, then inspect the Scale call and the analyzer's classification guidance. Determine whether passing coeff by reference is a bug, mitigated, or desirable behavior; done means leaving the appropriate classification reaction on this issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100