From patchwork Tue Nov 17 10:00:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ang Way Chuang X-Patchwork-Id: 60607 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAHA0PHK002574 for ; Tue, 17 Nov 2009 10:00:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753642AbZKQKAS (ORCPT ); Tue, 17 Nov 2009 05:00:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753354AbZKQKAS (ORCPT ); Tue, 17 Nov 2009 05:00:18 -0500 Received: from mail-pz0-f171.google.com ([209.85.222.171]:54971 "EHLO mail-pz0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753226AbZKQKAR (ORCPT ); Tue, 17 Nov 2009 05:00:17 -0500 Received: by pzk1 with SMTP id 1so3474312pzk.33 for ; Tue, 17 Nov 2009 02:00:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=Gc5aE9syPSiQEPNOVOLBrCdS2PIcEfAzg+pV3miPy/g=; b=Dh4pt+yqHnDVzSfI9IutJ+nCtNRWCQoL+GjmFDmPjJ28UL1SiXzR9nZ01Uyo4/0Ldo QyH+7HK1h6euzK3QvSpfvpRBM9Yamt6aU1fOGmno/Aa3UI5Qlw1gW0ge/G41JGUWILuu Xdh7XKubrCq62aTAWi4DI0PRcge1INJGZnLlY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=lK+QKh36diqi7nLJN4uZbn6NUOVr9b1KH4ZK8daF4xKqLHDeC3KeAIMb0dMv0PyZr5 yIm8TOZQd3MYN6Jf8JWxLI+LYvP9YPzYjoqErL7l+4d/ualo+c7/H7E13wm9baPBuZME 9hDSBTtuL+eeNFMaw+fahAmNC3Yuy7hRn1c54= MIME-Version: 1.0 Received: by 10.143.154.17 with SMTP id g17mr927391wfo.247.1258452022997; Tue, 17 Nov 2009 02:00:22 -0800 (PST) Date: Tue, 17 Nov 2009 18:00:22 +0800 Message-ID: <51d384e10911170200k269820bboe737a4f3fdec9fba@mail.gmail.com> Subject: [PATCH] dvb-core: Fix ULE decapsulation bug when less than 4 bytes of ULE SNDU is packed into the remaining bytes of a MPEG2-TS frame From: Ang Way Chuang To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hilmar Linder , Wolfram Stering Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c index 0241a7c..a521395 100644 --- a/drivers/media/dvb/dvb-core/dvb_net.c +++ b/drivers/media/dvb/dvb-core/dvb_net.c @@ -533,6 +533,7 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) from_where += 2; } + priv->ule_sndu_remain = priv->ule_sndu_len + 2; /* * State of current TS: