lkml.org 
[lkml]   [2006]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/media/video/bt866.c: array overflows
The Coverity checker spotted the following two array overflows:


<-- snip -->

...
struct bt866 {
...
unsigned char reg[128];
...
}
...
static int bt866_do_command(struct bt866 *encoder,
unsigned int cmd, void *arg)
{
...
val = encoder->reg[0xdc];
...
bt866_write(encoder, 0xdc, val);
...
}
...
static int bt866_write(struct bt866 *encoder,
unsigned char subaddr, unsigned char data)
{
...
encoder->reg[subaddr] = data;
...
}
...

<-- snip -->


The two bugs are obvious:
0xdc = 220 >= 128


cu
Adrian

--

Gentoo kernels are 42 times more popular than SUSE kernels among
KLive users (a service by SUSE contractor Andrea Arcangeli that
gathers data about kernels from many users worldwide).

There are three kinds of lies: Lies, Damn Lies, and Statistics.
Benjamin Disraeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-15 01:27    [W:0.267 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site