On Mon, Aug 23, 2010 at 11:02 PM, Arnaud Patard <arnaud.patard@xxxxxxxxxxx> wrote: > 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 Thanks! > Signed-off-by: Arnaud Patard <arnaud.patard@xxxxxxxxxxx> Acked-by: Ivo van Doorn <IvDoorn@xxxxxxxxx> > Index: rt2x00/drivers/net/wireless/rt2x00/rt2x00debug.c > =================================================================== > --- rt2x00.orig/drivers/net/wireless/rt2x00/rt2x00debug.c 2010-08-23 18:03:31.414826113 +0200 > +++ rt2x00/drivers/net/wireless/rt2x00/rt2x00debug.c 2010-08-23 20:37:24.894366547 +0200 > @@ -480,6 +480,9 @@ static ssize_t rt2x00debug_write_##__nam > if (index >= debug->__name.word_count) \ > return -EINVAL; \ > \ > + if (length > sizeof(line)) \ > + return -EINVAL; \ > + \ > if (copy_from_user(line, buf, length)) \ > return -EFAULT; \ > \ > > > ÿôèº{.nÇ+?·?®??+%?Ëÿ±éݶ¥?wÿº{.nÇ+?·¥?{±ÿ«zW¬³ø§¶?¡Ü¨}©?²Æ zÚ&j:+v?¨þø¯ù®w¥þ?à2?Þ?¨èÚ&¢)ß¡«a¶Úÿÿûàz¿äz¹Þ?ú+?ù???Ý¢jÿ?wèþf