Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
15e0093e
Commit
15e0093e
authored
May 30, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue where the client could crash when sending malformed data
parent
99797858
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
peer.go
peer.go
+5
-3
No files found.
peer.go
View file @
15e0093e
...
@@ -450,9 +450,11 @@ func (p *Peer) HandleInbound() {
...
@@ -450,9 +450,11 @@ func (p *Peer) HandleInbound() {
//ethutil.Config.Log.Debugf("[PEER] Could not find a similar block")
//ethutil.Config.Log.Debugf("[PEER] Could not find a similar block")
// If no blocks are found we send back a reply with msg not in chain
// If no blocks are found we send back a reply with msg not in chain
// and the last hash from get chain
// and the last hash from get chain
lastHash
:=
msg
.
Data
.
Get
(
l
-
1
)
if
l
>
0
{
//log.Printf("Sending not in chain with hash %x\n", lastHash.AsRaw())
lastHash
:=
msg
.
Data
.
Get
(
l
-
1
)
p
.
QueueMessage
(
ethwire
.
NewMessage
(
ethwire
.
MsgNotInChainTy
,
[]
interface
{}{
lastHash
.
Raw
()}))
//log.Printf("Sending not in chain with hash %x\n", lastHash.AsRaw())
p
.
QueueMessage
(
ethwire
.
NewMessage
(
ethwire
.
MsgNotInChainTy
,
[]
interface
{}{
lastHash
.
Raw
()}))
}
}
}
case
ethwire
.
MsgNotInChainTy
:
case
ethwire
.
MsgNotInChainTy
:
ethutil
.
Config
.
Log
.
Debugf
(
"Not in chain: %x
\n
"
,
msg
.
Data
.
Get
(
0
)
.
Bytes
())
ethutil
.
Config
.
Log
.
Debugf
(
"Not in chain: %x
\n
"
,
msg
.
Data
.
Get
(
0
)
.
Bytes
())
...
...
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