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

net.ParseIP panic #1695

Closed
gopherbot opened this issue Apr 14, 2011 · 2 comments
Closed

net.ParseIP panic #1695

gopherbot opened this issue Apr 14, 2011 · 2 comments

Comments

@gopherbot
Copy link
Contributor

by jacob.andrew.parker:

What steps will reproduce the problem?

package main

import "net"
import "fmt"

func main () {
  ip := net.ParseIP ("123:")
  if ip == nil {
    fmt.Println ("sad")
  } else {
    fmt.Println ("yay")
  }
}

What is the expected output?
sad

What do you see instead?
panic: runtime error: index out of range

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Ubuntu x64

Which revision are you using?  (hg identify)
0637076c39bc

Please provide any additional information below.
@gopherbot
Copy link
Contributor Author

Comment 1 by qyzhai:

code review 4418042: net: fix ParseIP (issue4418042)
http://golang.org/cl/4418042/
https://groups.google.com/forum/#!topic/golang-dev/cdFbcpWoZX4

@rsc
Copy link
Contributor

rsc commented Apr 15, 2011

Comment 2:

This issue was closed by revision c09af66.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
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

2 participants