William Ahern:
authorDaniel Stenberg <daniel@haxx.se>
Thu, 2 Jun 2005 11:09:10 +0000 (11:09 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 2 Jun 2005 11:09:10 +0000 (11:09 +0000)
commitae75ee14234b6d1b22832081d7dbd1d281c955cb
treeb641bfa28499203afe48417b389500b6bf35e17e
parent209b6c1af7093fd0990552e7288f05f33cd1b127
William Ahern:

  I'm not quite sure how this was happening, but I've been seeing PTR queries
  which seem to return empty responses. At least, they were empty when calling
  ares_expand_name() on the record. Here's a patch which guarantees to
  NUL-terminate the expanded name. The old behavior failed to NUL-terminate if
  len was 0, and this was causing strlen() to run past the end of the buffer
  after calling ares_expand_name() and getting ARES_SUCCESS as the return
  value. If q is not greater than *s then it's equal and *s is always
  allocated with at least one byte.
CHANGES
ares_expand_name.c