mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/media/video/bt866.c: array overflows
@ 2006-08-14 23:23 Adrian Bunk
  2006-08-15  6:06 ` Martin Samuelsson
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2006-08-14 23:23 UTC (permalink / raw)
  To: Martin Samuelsson, mchehab; +Cc: v4l-dvb-maintainer, linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: drivers/media/video/bt866.c: array overflows
  2006-08-14 23:23 drivers/media/video/bt866.c: array overflows Adrian Bunk
@ 2006-08-15  6:06 ` Martin Samuelsson
  2006-08-15 18:13   ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Samuelsson @ 2006-08-15  6:06 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: mchehab, v4l-dvb-maintainer, linux-kernel

On Tue, 15 Aug 2006 01:23:37 +0200
Adrian Bunk <bunk@stusta.de> wrote:

> The Coverity checker spotted the following two array overflows:

Nice coverity checker! *pat pat*

Now, a question: Where can I find the latest version of the files that concern the avs6eyes driver? In april, I got this mail that informed me that the avs6eyes driver patch had been removed from the -mm tree. I figured that it was removed because of the lack of internal V4L2 support when V4L1 was about to be chucked out from the kernel. I looked around a little to see if I could find the driver, but I couldn't.

Obviously, as you've found bugs in it, I didn't look in the right places. Where, pray tell, did the little critter go?

Getting a new job and moving to another city has hampered me in my efforts to work on the driver, that's why I've been so quiet.

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

Gotta fix that. Good work.

/Sam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: drivers/media/video/bt866.c: array overflows
  2006-08-15  6:06 ` Martin Samuelsson
@ 2006-08-15 18:13   ` Adrian Bunk
  2006-08-15 21:04     ` Martin Samuelsson
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2006-08-15 18:13 UTC (permalink / raw)
  To: Martin Samuelsson
  Cc: mchehab, v4l-dvb-maintainer, linux-kernel, Andrew Morton

On Tue, Aug 15, 2006 at 08:06:18AM +0200, Martin Samuelsson wrote:
> On Tue, 15 Aug 2006 01:23:37 +0200
> Adrian Bunk <bunk@stusta.de> wrote:
> 
> > The Coverity checker spotted the following two array overflows:
> 
> Nice coverity checker! *pat pat*
> 
> Now, a question: Where can I find the latest version of the files that concern the avs6eyes driver? In april, I got this mail that informed me that the avs6eyes driver patch had been removed from the -mm tree. I figured that it was removed because of the lack of internal V4L2 support when V4L1 was about to be chucked out from the kernel. I looked around a little to see if I could find the driver, but I couldn't.
> 
> Obviously, as you've found bugs in it, I didn't look in the right places. Where, pray tell, did the little critter go?
>...

It's in 2.6.18-rc4.

> /Sam

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: drivers/media/video/bt866.c: array overflows
  2006-08-15 18:13   ` Adrian Bunk
@ 2006-08-15 21:04     ` Martin Samuelsson
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Samuelsson @ 2006-08-15 21:04 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: mchehab, v4l-dvb-maintainer, linux-kernel, akpm

On Tue, 15 Aug 2006 20:13:20 +0200
Adrian Bunk <bunk@stusta.de> wrote:

> On Tue, Aug 15, 2006 at 08:06:18AM +0200, Martin Samuelsson wrote:
> > Obviously, as you've found bugs in it, I didn't look in the right places. Where, pray tell, did the little critter go?
> >...
> 
> It's in 2.6.18-rc4.

Nice, it hid in Linus' tree for a while, then. Compiling it now.

Thanks!

/Sam

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-15 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-14 23:23 drivers/media/video/bt866.c: array overflows Adrian Bunk
2006-08-15  6:06 ` Martin Samuelsson
2006-08-15 18:13   ` Adrian Bunk
2006-08-15 21:04     ` Martin Samuelsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®