提交 375bb0e0 编写于 作者: D Dmitry Eremin-Solenikov

wpan-phy: use snprintf to limit the amount of chars written

Use snprintf to limit the amount of chars put in the buffer for attr -> show.
Signed-off-by: NDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
上级 37eb0edc
......@@ -30,7 +30,7 @@ static ssize_t name ## _show(struct device *dev, \
int ret; \
\
mutex_lock(&phy->pib_lock); \
ret = sprintf(buf, format_string "\n", args); \
ret = snprintf(buf, PAGE_SIZE, format_string "\n", args); \
mutex_unlock(&phy->pib_lock); \
return ret; \
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册