Socket#pack_sockaddr_in fails for port numbers greater than 32383
-----------------------------------------------------------------

                 Key: JRUBY-5479
                 URL: http://jira.codehaus.org/browse/JRUBY-5479
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6RC2
         Environment: OSX
            Reporter: bob mcwhirter
            Assignee: Thomas E Enebo


If you pack a sockaddr involving a port higher than 32383, it will create an 
invalid sockaddr with a port probably outside the legal range.

{noformat}
irb(main):021:0> Socket.unpack_sockaddr_in( Socket.pack_sockaddr_in( 32383, 
'localhost' ) ).inspect
=> "[32383, \"127.0.0.1\"]"
irb(main):022:0> Socket.unpack_sockaddr_in( Socket.pack_sockaddr_in( 32384, 
'localhost' ) ).inspect
=> "[97789, \"127.0.0.1\"]"
{noformat}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to