From patchwork Sat Dec 28 15:45:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Roth?= X-Patchwork-Id: 3414141 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BAE499F37A for ; Sat, 28 Dec 2013 15:47:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0505020127 for ; Sat, 28 Dec 2013 15:47:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3639520103 for ; Sat, 28 Dec 2013 15:47:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755300Ab3L1Pqm (ORCPT ); Sat, 28 Dec 2013 10:46:42 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:55019 "EHLO mail-ea0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755271Ab3L1PqU (ORCPT ); Sat, 28 Dec 2013 10:46:20 -0500 Received: by mail-ea0-f173.google.com with SMTP id o10so4355776eaj.18 for ; Sat, 28 Dec 2013 07:46:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=6YAiMqR69wlRPhLx92Zn5AHtzilZGR4ByGv775OU0gY=; b=Flcpi3V39ruxGU+giHOIqbp8mzTCNtIXcCBJncQ5jiDPRhBYfRySP0BeHQC9zt1bKc JfU3eGli9d91CEO1OZKo9sN9YtLGciWJ6QxP5XfIHQKGw3P4NiziiDyxcMszkqpBzEYL RPB31DirHCiVEjPsYlnU1JWDzQ7248vK11Gt+bkQhs3A4LbhaEkOgp8JSVlnmemn+tB1 6QnBH4G6ergedcxk4nPOsDKdmE1u2zJpIHjPLq46VugfKvUuz5Nv4aWyNqFAZSAX+f4p +gunUcvOdjJPSl3RSSk0mvkl0iStwllWGa94XCkoKE965REVBDg4bVSZNF0o/T2yofu0 mcwg== X-Received: by 10.14.101.4 with SMTP id a4mr47166682eeg.28.1388245579859; Sat, 28 Dec 2013 07:46:19 -0800 (PST) Received: from neutrino.exnihilo (140-227.61-188.cust.bluewin.ch. [188.61.227.140]) by mx.google.com with ESMTPSA id n1sm91594131eep.20.2013.12.28.07.46.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Dec 2013 07:46:19 -0800 (PST) From: =?UTF-8?q?Andr=C3=A9=20Roth?= To: Linux Media Mailing List Cc: =?UTF-8?q?Andr=C3=A9=20Roth?= Subject: [PATCH 04/13] libdvbv5: fix deadlock on missing table sections Date: Sat, 28 Dec 2013 16:45:52 +0100 Message-Id: <1388245561-8751-4-git-send-email-neolynx@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1388245561-8751-1-git-send-email-neolynx@gmail.com> References: <1388245561-8751-1-git-send-email-neolynx@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: André Roth --- lib/libdvbv5/dvb-scan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c index 76712d4..9751f9d 100644 --- a/lib/libdvbv5/dvb-scan.c +++ b/lib/libdvbv5/dvb-scan.c @@ -96,6 +96,10 @@ int dvb_read_section_with_id(struct dvb_v5_fe_parms *parms, int dmx_fd, uint8_t *buf = NULL; uint8_t *tbl = NULL; ssize_t table_length = 0; + + // handle sections + int start_id = -1; + int start_section = -1; int first_section = -1; int last_section = -1; int table_id = -1;