Commit 4427f9ab authored by Ben Hutchings's avatar Ben Hutchings Committed by Greg Kroah-Hartman

dns_resolver: Null-terminate the right string

[ Upstream commit 640d7efe ]

*_result[len] is parsed as *(_result[len]) which is not at all what we
want to touch here.
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Fixes: 84a7c0b1 ("dns_resolver: assure that dns_query() result is null-terminated")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c304a23b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment