Skip to content
  • Junio C Hamano's avatar
    Merge branch 'dt/xgethostname-nul-termination' · 5938454c
    Junio C Hamano authored
    gethostname(2) may not NUL terminate the buffer if hostname does
    not fit; unfortunately there is no easy way to see if our buffer
    was too small, but at least this will make sure we will not end up
    using garbage past the end of the buffer.
    
    * dt/xgethostname-nul-termination:
      xgethostname: handle long hostnames
      use HOST_NAME_MAX to size buffers for gethostname(2)
    5938454c