Skip to content
New issue

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

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

Already on GitHub? # to your account

Out of range in ipfs add #2506

Closed
wants to merge 3 commits into from
Closed

Conversation

MichaelMure
Copy link
Contributor

I triggered an out of range in coreunix/add.go when adding a file through the API (I accidentally made a POST query without an actual file content).

Fixed it and documented/cleaned the code in the process.

@@ -181,7 +178,7 @@ func (adder *Adder) Finalize() (*dag.Node, error) {
}

var name string
if !adder.Wrap {
if !adder.Wrap && len(root.Links) == 1 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix.

@whyrusleeping
Copy link
Member

Good catch, Do you think you could add a sharness test for this somewhere?

maybe in tests/sharness/t0235...?

@MichaelMure
Copy link
Contributor Author

Will do

@MichaelMure MichaelMure changed the title Add out of range Out of range in ipfs add Mar 25, 2016
@whyrusleeping
Copy link
Member

@MichaelMure the codepath youre toching in the PR has changed. Can you rerun your repro and see if this issue still occurs on master?

License: MIT
Signed-off-by: Michael Muré <batolettre@gmail.com>
License: MIT
Signed-off-by: Michael Muré <batolettre@gmail.com>
License: MIT
Signed-off-by: Michael Muré <batolettre@gmail.com>
@whyrusleeping whyrusleeping added need_tests need/author-input Needs input from the original author labels May 14, 2016
@whyrusleeping
Copy link
Member

I don't think the bugfix here is relevant any longer, but the documentation would be nice.

@whyrusleeping
Copy link
Member

Closing due to inactivity, please reopen as needed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
need/author-input Needs input from the original author need_tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants