Dan Carpenter b7a314054e isdn: icn: buffer overflow in icn_command()
This buffer over was detected using static analysis:

	drivers/isdn/icn/icn.c:1325 icn_command()
	error: format string overflow. buf_size: 60 length: 98

The calculation for the length of the string is off because it assumes
that the dial[] buffer holds a 50 character string, but actually it is
at most 31 characters and NUL.  I have removed the dial[] buffer because
it isn't needed.

The maximum length of the string is actually 79 characters and a NUL.  I
have made the cbuf[] array large enough to hold it and changed the
sprintf() to an snprintf() as a further safety enhancement.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-04-16 15:24:15 -04:00
..
2014-04-08 21:34:51 +02:00
2014-04-05 15:37:40 -07:00
2014-04-11 13:25:08 -07:00
2014-04-05 15:37:40 -07:00
2014-04-07 10:24:18 -07:00
2014-04-08 13:28:02 +02:00
2014-04-08 13:27:40 +02:00
2014-04-07 10:24:18 -07:00
2014-04-01 16:13:21 -07:00
2014-04-08 13:27:40 +02:00
2014-04-07 10:24:18 -07:00
2014-04-05 18:32:31 -07:00
2014-04-05 18:46:26 -07:00
2014-04-05 15:37:40 -07:00
2014-04-09 08:39:39 -07:00
2014-04-09 08:39:39 -07:00
2014-04-07 10:17:30 -07:00
2014-04-07 10:17:30 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 18:32:31 -07:00
2014-04-11 13:30:05 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 15:38:41 -07:00
2014-04-11 13:35:49 -07:00
2014-04-03 14:05:02 -07:00
2014-04-07 17:50:18 -07:00