OSDN Git Service

Copy the entire zero-separated DNS seach domain string.
authorPierre Imai <imaipi@google.com>
Mon, 29 Feb 2016 07:31:55 +0000 (16:31 +0900)
committerPierre Imai <imaipi@google.com>
Mon, 29 Feb 2016 07:50:38 +0000 (16:50 +0900)
commit0967fc7e59cda0ea2561b0eaa58ed842da7c0eb9
tree2c7ec97be03c6b1b658cd6739960d0b359375c2d
parent17866357c5437d1b43b9f4b7411e48d9c9c38bec
Copy the entire zero-separated DNS seach domain string.

The DNS search string contains zeros as domain separator. The resolver
code erroneously used strlcpy(), which resulted in only the first domain
to be copied. The code uses pointers into this string to access the
individual domains. Since the structure is zero-initialized, this bug only
resulted in zero-length domains instead of accessing unitialized memory.

BUG: 27312811
Change-Id: Ia9d066c405dfcc5e82d6766d93ead2ce574e7b0d
libc/dns/resolv/res_cache.c