mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
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>
This commit is contained in:
parent
37eb0edc84
commit
375bb0e04b
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ static ssize_t name ## _show(struct device *dev, \
|
||||||
int ret; \
|
int ret; \
|
||||||
\
|
\
|
||||||
mutex_lock(&phy->pib_lock); \
|
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); \
|
mutex_unlock(&phy->pib_lock); \
|
||||||
return ret; \
|
return ret; \
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue