mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
dns_resolver: Null-terminate the right string
*_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>
This commit is contained in:
parent
653bbf199d
commit
640d7efe4c
@ -150,7 +150,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;
|
||||
|
Loading…
Reference in New Issue
Block a user