Commit-ID: f8d8b7a13d3d61f99bf3dc5c9650f87f9818d7a7 Gitweb: http://git.kernel.org/tip/f8d8b7a13d3d61f99bf3dc5c9650f87f9818d7a7 Author: Arnaud Patard (Rtp) <arnaud.patard@xxxxxxxxxxx> AuthorDate: Mon, 23 Aug 2010 23:02:22 +0200 Committer: John W. Linville <linville@xxxxxxxxxxxxx> CommitDate: Wed, 25 Aug 2010 14:34:56 -0400 rt2x00: fix "buffer size not provably correct" build warning rt2x00 debugfs interface doesn't check the size of the data coming from userspace, leading to a build warning. Fix That. v2: return EINVAL if input is too long Signed-off-by: Arnaud Patard <arnaud.patard@xxxxxxxxxxx> Acked-by: Ivo van Doorn <IvDoorn@xxxxxxxxx> Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx> --- drivers/net/wireless/rt2x00/rt2x00debug.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c index 74f0d67..daf7f95 100644 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c @@ -480,6 +480,9 @@ static ssize_t rt2x00debug_write_##__name(struct file *file, \ if (index >= debug->__name.word_count) \ return -EINVAL; \ \ + if (length > sizeof(line)) \ + return -EINVAL; \ + \ if (copy_from_user(line, buf, length)) \ return -EFAULT; \ \ -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html