From patchwork Wed May 19 16:58:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 100950 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4JH0Ziw014329 for ; Wed, 19 May 2010 17:00:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751688Ab0ESRAe (ORCPT ); Wed, 19 May 2010 13:00:34 -0400 Received: from mail-in-07.arcor-online.net ([151.189.21.47]:45511 "EHLO mail-in-07.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336Ab0ESRAd (ORCPT ); Wed, 19 May 2010 13:00:33 -0400 Received: from mail-in-08-z2.arcor-online.net (mail-in-08-z2.arcor-online.net [151.189.8.20]) by mx.arcor.de (Postfix) with ESMTP id A3E3C107F7E; Wed, 19 May 2010 19:00:32 +0200 (CEST) Received: from mail-in-01.arcor-online.net (mail-in-01.arcor-online.net [151.189.21.41]) by mail-in-08-z2.arcor-online.net (Postfix) with ESMTP id 9C80377EBE; Wed, 19 May 2010 19:00:32 +0200 (CEST) Received: from localhost.localdomain (dslb-094-222-008-085.pools.arcor-ip.net [94.222.8.85]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-01.arcor-online.net (Postfix) with ESMTPA id 3D5295A577; Wed, 19 May 2010 19:00:32 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-01.arcor-online.net 3D5295A577 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1274288432; bh=TkBZHcLs8lepDbyZ9wtaAIOb7ijCn/xlsdMrvMPqLuo=; h=From:To:Cc:Subject:Date:Message-Id; b=NUNInI0IQy7dYiYRVz0KOtjVIUf1ANepmhn7ZlcooJKhibdIRjAsRlYpOOASTWFp4 lATHSe2q/foEuj7ZTompI+xyQ33OYd9QC/JzMM26yFE7XoaT35D513QekKJIyzobLv /Ll/Z1U/T9Rh5qCT9lCTWtQMi/qSqME1JYMd92xE= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, d.belimov@gmail.com, Stefan Ringel Subject: [PATCH 1/4] tm6000: bugfix incorrect size Date: Wed, 19 May 2010 18:58:24 +0200 Message-Id: <1274288307-2858-3-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.7.0.3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 19 May 2010 17:00:36 +0000 (UTC) diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 9554472..e5f8b57 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;