staging: cxt1e1: buffer overflow in do_del_chan()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Jan 2013 06:41:43 +0000 (09:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Jan 2013 19:21:26 +0000 (11:21 -0800)
commit96a8d14e875a017f9e9e71d93433414e9fb8863f
tree80e1968fc8318243921c35be0cf6324f4fa01e9f
parent392c6ff87f568d573239b763855160d1f06114de
staging: cxt1e1: buffer overflow in do_del_chan()

If we don't restrict "cp.channum" to 3 digits then the sprintf() will
overflow.  I've added a check and changed the sprintf() to snprintf().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/cxt1e1/linux.c