Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 375bb0e0 authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov
Browse files

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: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
parent 37eb0edc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;							\
}