Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-cidranger
Commits
ebd5c6cd
Commit
ebd5c6cd
authored
Sep 25, 2017
by
Yulin Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index-out-of-bounds check in trie.contains
parent
6a720386
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
trie.go
trie.go
+3
-0
No files found.
trie.go
View file @
ebd5c6cd
...
...
@@ -130,6 +130,9 @@ func (p *prefixTrie) contains(number rnet.NetworkNumber) (bool, error) {
if
p
.
hasEntry
()
{
return
true
,
nil
}
if
p
.
targetBitPosition
()
<
0
{
return
false
,
nil
}
bit
,
err
:=
p
.
targetBitFromIP
(
number
)
if
err
!=
nil
{
return
false
,
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment