Skip to content

Commit

Permalink
wpan-phy: use snprintf to limit the amount of chars written
Browse files Browse the repository at this point in the history
Use snprintf to limit the amount of chars put in the buffer for attr -> show.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
  • Loading branch information
lumag committed Nov 6, 2009
1 parent 37eb0ed commit 375bb0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ieee802154/wpan-class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
}
Expand Down

0 comments on commit 375bb0e

Please sign in to comment.