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-p2p-secio
Commits
3175340d
Unverified
Commit
3175340d
authored
Apr 28, 2019
by
Steven Allen
Committed by
GitHub
Apr 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #44 from libp2p/fix/oversize-read
fix buffer size check
parents
4d58713c
98b8bd9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
rw.go
rw.go
+1
-1
No files found.
rw.go
View file @
3175340d
...
...
@@ -167,7 +167,7 @@ func (r *etmReader) Read(buf []byte) (int, error) {
// If the destination buffer is too short, fill an internal buffer and then
// drain as much of that into the output buffer as will fit.
if
cap
(
buf
)
<
fullLen
{
if
len
(
buf
)
<
fullLen
{
err
:=
r
.
fill
()
if
err
!=
nil
{
return
0
,
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