github-vet / github-vet/rangeloop-pointer-findings
datasektionen/hodis: ldap.go; 20 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [datasektionen/hodis](https://www.github.com/datasektionen/hodis) at [ldap.go](https://github.com/datasektionen/hodis/blob/10ae409b3e548e646b36c40cd3363e31b2602f6e/ldap.go#L135-L154)
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.
>
[Click here to see the code in its original context.](https://github.com/datasektionen/hodis/blob/10ae409b3e548e646b36c40cd3363e31b2602f6e/ldap.go#L135-L154)
Click here to show the 20 line(s) of Go which triggered the analyzer.
```go
for _, value := range userResults {
user := User{Uid: ""}
s.db.First(&user, "ug_kthid = ?", value.UgKthid)
if user.Uid == "" {
s.db.Create(&value)
} else {
//Add some arbitrary decay to the the users refs
user.Refs = uint(float64(user.Refs) * 0.9)
//Update names to match new base DN
//These should be removed in the future
user.Cn = value.Cn
user.GivenName = value.GivenName
user.DisplayName = value.DisplayName
user.Mail = value.Mail
s.db.Save(&user)
}
}
```
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.
No path was found through the callgraph that could lead to a function which passes a pointer to third-party code.
root signature {Create 1} was not found in the callgraph; reference was passed directly to third-party code
```
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: 10ae409b3e548e646b36c40cd3363e31b2602f6e
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.