[ruby-cvs:53656] usa:r46510 (ruby_2_0_0): merge revision(s) 39239, 45045, 45530: [Backport #9697]

usa at ruby-lang.org usa at ruby-lang.org
Mon Jun 23 17:25:44 JST 2014


usa	2014-06-23 17:25:41 +0900 (Mon, 23 Jun 2014)

  New Revision: 46510

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46510

  Log:
    merge revision(s) 39239,45045,45530: [Backport #9697]
    
    * ext/socket: always operate length of socket addess companion with
      socket address. 
    
    * ext/socket/rubysocket.h (rsock_make_ipaddr): add an argument for
      socket address length.
      (rsock_ipaddr): ditto.
    
    * ext/socket/ipsocket.c (ip_addr): pass length to rsock_ipaddr.
      (ip_peeraddr): ditto.
      (ip_s_getaddress): pass length to rsock_make_ipaddr.
    
    * ext/socket/socket.c (make_addrinfo): pass length to rsock_ipaddr.
      (sock_s_getnameinfo): pass actual address length to rb_getnameinfo.
      (sock_s_unpack_sockaddr_in): pass length to rsock_make_ipaddr.
      
    
    * ext/socket/init.c (rsock_s_recvfrom): pass length to rsock_ipaddr.
      (rsock_s_recvfrom_nonblock): ditto.
    
    * ext/socket/tcpsocket.c (tcp_sockaddr): pass length to
      rsock_make_ipaddr.
    
    * ext/socket/raddrinfo.c (make_ipaddr0): add an argument for socket
      address length.  pass the length to rb_getnameinfo.
      (rsock_ipaddr): ditto.
      (rsock_make_ipaddr): add an argument for socket address length. 
      pass the length to make_ipaddr0.
      (make_inetaddr): pass length to make_ipaddr0.
      a local variable renamed.
      (host_str): a local variable renamed.
      (port_str): ditto.
    
    * ext/socket/ipsocket.c (ip_s_getaddress): Don't access freed memory.
    
    * ext/socket/socket.c (sock_s_getnameinfo): Save errno for EAI_SYSTEM.
      Reported by Saravana kumar.  [ruby-core:61820] [Bug #9697]
      Fixed by Heesob Park.  [ruby-core:61868]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/ext/socket/init.c
    branches/ruby_2_0_0/ext/socket/ipsocket.c
    branches/ruby_2_0_0/ext/socket/raddrinfo.c
    branches/ruby_2_0_0/ext/socket/rubysocket.h
    branches/ruby_2_0_0/ext/socket/socket.c
    branches/ruby_2_0_0/ext/socket/tcpsocket.c
    branches/ruby_2_0_0/version.h


More information about the ruby-cvs mailing list