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

strconv.UnquoteChar fails for invalid octal digits, e.g. "\129" #2658

Closed
adonovan opened this issue Jan 4, 2012 · 2 comments
Closed

strconv.UnquoteChar fails for invalid octal digits, e.g. "\129" #2658

adonovan opened this issue Jan 4, 2012 · 2 comments

Comments

@adonovan
Copy link
Member

adonovan commented Jan 4, 2012

See example at http://play.golang.org/p/5Nf9HqvwAX

I found the bug by inspection while perusing http://golang.org/src/pkg/strconv/quote.go

   237          for j := 0; j < 2; j++ { // one digit already; two more
   238              x := int(s[j]) - '0'
   239              if x < 0 || x > 7 {
                                        // FIXME(go-team): must set 'err'.
   240                  return
   241              }
   242              v = (v << 3) | x
   243          }
@Sajmani
Copy link
Contributor

Sajmani commented Jan 9, 2012

Comment 1:

Owner changed to @Sajmani.

Status changed to Accepted.

@Sajmani
Copy link
Contributor

Sajmani commented Jan 10, 2012

Comment 2:

This issue was closed by revision cbf4f4b.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc unassigned Sajmani Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants