Skip to content
Snippets Groups Projects
  • George Joseph's avatar
    eb5b83b8
    AST-2018-010: Fix length of buffer needed for SRV and NAPTR results · eb5b83b8
    George Joseph authored
    When dn_expand was being called on SRV and NAPTR results, the
    return value was being used to calculate the size of the buffer
    needed to store the host names.  Since dn_expand returns the
    length of the COMPRESSED name the buffer could be too short
    to hold the EXPANDED name.  The expanded name is NULL terminated
    so using strlen() is the correct way to determine the length
    actually needed for the buffer.
    
    ASTERISK-28127
    Reported by: Jan Hoffmann
    
    patches:
      patch.diff submitted by janhoffmann (license 6986)
    
    Change-Id: I4d35d6c431c6c6836cb61d37b1378cc47f0b414d
    eb5b83b8
    History
    AST-2018-010: Fix length of buffer needed for SRV and NAPTR results
    George Joseph authored
    When dn_expand was being called on SRV and NAPTR results, the
    return value was being used to calculate the size of the buffer
    needed to store the host names.  Since dn_expand returns the
    length of the COMPRESSED name the buffer could be too short
    to hold the EXPANDED name.  The expanded name is NULL terminated
    so using strlen() is the correct way to determine the length
    actually needed for the buffer.
    
    ASTERISK-28127
    Reported by: Jan Hoffmann
    
    patches:
      patch.diff submitted by janhoffmann (license 6986)
    
    Change-Id: I4d35d6c431c6c6836cb61d37b1378cc47f0b414d