Skip to content

Commit

Permalink
V4L/DVB: TM6000: Fix code which cause memory corruption
Browse files Browse the repository at this point in the history
The driver was doing malloc when buf is null causing memory corruption.

The analog part is still pretty much broken but at least fixing this
will stop it from crashing the machine when streamon.

Signed-off-by: Bee Hock Goh <beehock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Bee Hock Goh authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent 4d1f413 commit c16dd82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/tm6000/tm6000-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ static inline int tm6000_isoc_copy(struct urb *urb)
unsigned long copied;

get_next_buf(dma_q, &buf);
if (!buf)
if (buf)
outp = videobuf_to_vmalloc(&buf->vb);

if (!outp)
Expand Down

0 comments on commit c16dd82

Please sign in to comment.