dnsproxy: Check overlapping memcpy
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Fri, 1 Jun 2012 12:02:06 +0000 (15:02 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Thu, 7 Jun 2012 07:39:46 +0000 (10:39 +0300)
commit4884c249bf7f098bbffd1a704a0a5ade573bee54
tree0f6725d54308e737327d6e9e215887a8c031f47b
parentffcaa03b166c6eaaf57e7edbd633a4fd30d9fd93
dnsproxy: Check overlapping memcpy

The problem was seen with valgrind. We tried to get hostname
without domain part and if server returns an error, we could
end up in situation where domain_len == 0 even if append_domain
is set to TRUE. So check that if domain_len is 0, then do not
try to memcpy.
src/dnsproxy.c