mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
3
changelog/potuz_fix_linter.md
Normal file
3
changelog/potuz_fix_linter.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix array out of bounds in static analyzer.
|
||||||
@@ -525,6 +525,9 @@ func hasNestedlock(fullRLockSelector *selIdentList, goPos token.Pos, compareMap
|
|||||||
if node == (*ast.FuncDecl)(nil) {
|
if node == (*ast.FuncDecl)(nil) {
|
||||||
return ""
|
return ""
|
||||||
} else if castedNode, ok := node.(*ast.FuncDecl); ok && castedNode.Recv != nil {
|
} else if castedNode, ok := node.(*ast.FuncDecl); ok && castedNode.Recv != nil {
|
||||||
|
if len(castedNode.Recv.List) == 0 || len(castedNode.Recv.List[0].Names) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
recv = castedNode.Recv.List[0].Names[0]
|
recv = castedNode.Recv.List[0].Names[0]
|
||||||
rLockSelector.changeRoot(recv, pass.TypesInfo.ObjectOf(recv))
|
rLockSelector.changeRoot(recv, pass.TypesInfo.ObjectOf(recv))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user