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
65f486ff
Commit
65f486ff
authored
Dec 21, 2016
by
Aron Fischer
Committed by
Felix Lange
Dec 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swarm/api: check for zero length manifest error (#3468)
parent
df096a77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
manifest.go
swarm/api/manifest.go
+5
-0
No files found.
swarm/api/manifest.go
View file @
65f486ff
...
...
@@ -62,6 +62,11 @@ func readManifest(manifestReader storage.LazySectionReader, hash storage.Key, dp
// TODO check size for oversized manifests
size
,
err
:=
manifestReader
.
Size
(
quitC
)
if
err
!=
nil
{
// size == 0
// can't determine size means we don't have the root chunk
err
=
fmt
.
Errorf
(
"Manifest not Found"
)
return
}
manifestData
:=
make
([]
byte
,
size
)
read
,
err
:=
manifestReader
.
Read
(
manifestData
)
if
int64
(
read
)
<
size
{
...
...
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