dns_resolver: Null-terminate the right string

[ Upstream commit 640d7efe4c ]

*_result[len] is parsed as *(_result[len]) which is not at all what we
want to touch here.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: 84a7c0b1db ("dns_resolver: assure that dns_query() result is null-terminated")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ben Hutchings 2014-07-21 00:06:48 +01:00 committed by Greg Kroah-Hartman
parent c304a23b4e
commit 4427f9abd5
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ int dns_query(const char *type, const char *name, size_t namelen,
goto put;
memcpy(*_result, upayload->data, len);
*_result[len] = '\0';
(*_result)[len] = '\0';
if (_expiry)
*_expiry = rkey->expiry;