From 375bb0e04b618d0c425b0ea492d16cf71eb94905 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Mon, 28 Sep 2009 18:58:32 +0400 Subject: 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: Dmitry Eremin-Solenikov --- net/ieee802154/wpan-class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/ieee802154') diff --git a/net/ieee802154/wpan-class.c b/net/ieee802154/wpan-class.c index a10ae5be6ad..68ccde63155 100644 --- a/net/ieee802154/wpan-class.c +++ b/net/ieee802154/wpan-class.c @@ -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; \ } -- cgit v1.2.3