diff options
author | Stefan Ringel <stefan.ringel@arcor.de> | 2010-05-19 13:58:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-01 01:21:58 -0300 |
commit | 0f9bdbc2da442a78990579cabc1554446ed784a7 (patch) | |
tree | c5999f893006046b945a21a36a0471dacdaaefa6 /drivers/staging/tm6000/tm6000-video.c | |
parent | 2a15ac7ad625dc22885446016d730a451df1b7d4 (diff) | |
download | linux-stable-0f9bdbc2da442a78990579cabc1554446ed784a7.tar.gz linux-stable-0f9bdbc2da442a78990579cabc1554446ed784a7.tar.bz2 linux-stable-0f9bdbc2da442a78990579cabc1554446ed784a7.zip |
V4L/DVB: tm6000: bugfix incorrect size
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/tm6000/tm6000-video.c')
-rw-r--r-- | drivers/staging/tm6000/tm6000-video.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index f2b7fe4a3581..2adf3cc972d3 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -205,7 +205,11 @@ static int copy_packet(struct urb *urb, u32 header, u8 **ptr, u8 *endp, c = (header >> 24) & 0xff; /* split the header fields */ - size = (((header & 0x7e) << 1) -1) *4; + size = ((header & 0x7e) << 1); + + if (size > 0) + size -= 4; + block = (header >> 7) & 0xf; field = (header >> 11) & 0x1; line = (header >> 12) & 0x1ff; |