Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Mar 1996 13:26:02 -0800 (PST)
From:      Bill Paul <wpaul>
To:        CVS-committers, cvs-all, cvs-lib
Subject:   cvs commit:  src/lib/libc/net gethostbynis.c ether_addr.c
Message-ID:  <199603162126.NAA02271@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       96/03/16 13:26:01

  Modified:    lib/libc/net  gethostbynis.c ether_addr.c
  Log:
  gethostbynis.c:
  
  - Fix problem described in PR #1079: _gethostbynisaddr() doesn't
    work. Make it accept the same arguments as all the other
    gethostby*addr() functions and properly convert the supplied IP
    address into a text string so that yp_match() can find it in the
    hosts.byaddr map.
  
  - Also fix potential memory leak: copy the results of yp_match() to
    a static buffer and free the result (yp_match() returns dynamically
    allocated memory).
  
  ether_addr.c:
  
  - Since I was in the neighborhood, fix ether_ntohost() and
    ether_hostton() so that they don't bogusly for a free(result)
    when yp_match() fails.
  
  Revision  Changes    Path
  1.2       +18 -5     src/lib/libc/net/gethostbynis.c
  1.3       +1 -3      src/lib/libc/net/ether_addr.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603162126.NAA02271>