summaryrefslogtreecommitdiffstats
path: root/net/ieee802154/wpan-class.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2009-09-28 16:58:32 +0200
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2009-11-06 12:13:45 +0100
commit375bb0e04b618d0c425b0ea492d16cf71eb94905 (patch)
tree88d966bbae654ac0d5e90206a47cd6b36142201f /net/ieee802154/wpan-class.c
parentwpan-phy: init channel/page fields (diff)
downloadlinux-375bb0e04b618d0c425b0ea492d16cf71eb94905.tar.xz
linux-375bb0e04b618d0c425b0ea492d16cf71eb94905.zip
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 <dbaryshkov@gmail.com>
Diffstat (limited to 'net/ieee802154/wpan-class.c')
-rw-r--r--net/ieee802154/wpan-class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ieee802154/wpan-class.c b/net/ieee802154/wpan-class.c
index a10ae5be6adb..68ccde63155b 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; \
}