dict: fix unquote panic when backslash is the last character - #259
dict: fix unquote panic when backslash is the last character#259zsj8844 wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
0d74f15 to
f9fcc68
Compare
The unquote function did not check bounds after advancing past a backslash, causing an index out of range panic when the backslash was the final character in the string. Add a bounds check and break out of the loop when the backslash has no following character to escape.
|
This PR (HEAD: 2c6d3f1) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/net/+/812301. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/812301. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/812301. |
|
This PR (HEAD: dac1f35) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/net/+/812301. Important tips:
|
|
Message from 张世杰: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/812301. |
|
Message from 张世杰: Patch Set 4: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/812301. |
|
Message from Nicholas Husin: Patch Set 4: Hold+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/812301. |
The unquote function did not check bounds after advancing past a
backslash, causing an index out of range panic when the backslash
was the final character in the string.
Add a bounds check and break out of the loop when the backslash
has no following character to escape.
Fixes golang/go#259