提交 640d7efe 编写于 作者: B Ben Hutchings 提交者: David S. Miller

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: NBen Hutchings <ben@decadent.org.uk>
Fixes: 84a7c0b1 ("dns_resolver: assure that dns_query() result is null-terminated")
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 653bbf19
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册