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

cli: Fix panic on empty data argument to kv put #2635

Merged
merged 1 commit into from
Jan 5, 2017
Merged

Conversation

jen20
Copy link
Contributor

@jen20 jen20 commented Jan 5, 2017

Passing in an empty quoted argument from the shell currently panics as we never check the length being greater than 0 prior to indexing into the first rune, as illustrated in the test in this commit.

We also fix the panic, treating an empty string for data as equivalent to not having passed it in the first place.

Passing in an empty quoted argument from the shell currently panics as
we never check the length being greater than 0 prior to indexing into
the first rune, as illustrated in the test in this commit.

We also fix the panic, treating an empty string for data as equivalent
to not having passed it in the first place.
@jen20 jen20 added type/bug Feature does not function as expected type/crash The issue description contains a golang panic and stack trace labels Jan 5, 2017
@slackpad
Copy link
Contributor

slackpad commented Jan 5, 2017

LGTM

@slackpad slackpad merged commit 66f3a0f into master Jan 5, 2017
@slackpad slackpad deleted the kv-put-crash branch January 5, 2017 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Feature does not function as expected type/crash The issue description contains a golang panic and stack trace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants