Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check max string length when using WriteLenXString #728

Merged
merged 3 commits into from
Feb 22, 2019

Conversation

prashantv
Copy link
Contributor

@prashantv prashantv commented Feb 20, 2019

Previously, if a long string was passed in, we would overflow the length
and write the full string which resulted in a corrupted packet. Instead,
return an error if the passed in string is too long for the specified
max length (defined by size of the prefix).

Plumbing context for the error message would require significant plumbing
and may affect performance, so left it as a generic error.

Previously, if a long string was passed in, we would overflow the length
and write the full string which resulted in a corrupted packet. Instead,
return an error if the passed in string is too long for the specified
max length (defined by size of the prefix).
@codecov
Copy link

codecov bot commented Feb 20, 2019

Codecov Report

Merging #728 into dev will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              dev     #728     +/-   ##
=========================================
- Coverage   87.63%   87.53%   -0.1%     
=========================================
  Files          40       40             
  Lines        4075     4075             
=========================================
- Hits         3571     3567      -4     
- Misses        381      387      +6     
+ Partials      123      121      -2
Impacted Files Coverage Δ
outbound.go 86.2% <ø> (ø) ⬆️
messages.go 97.84% <ø> (ø) ⬆️
introspection.go 92.38% <0%> (-3.34%) ⬇️
peer.go 93.45% <0%> (-0.37%) ⬇️
reqres.go 81.19% <0%> (+1.7%) ⬆️
root_peer_list.go 96% <0%> (+4%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 184b1be...f33b417. Read the comment docs.

typed/buffer.go Show resolved Hide resolved
@prashantv prashantv merged commit a255dc1 into dev Feb 22, 2019
@prashantv prashantv deleted the transport_headers_limits branch February 22, 2019 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants