From patchwork Fri May 31 13:46:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 1108375 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Fm325hgPz9sDX; Fri, 31 May 2019 23:47:08 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1hWhs9-00086q-6M; Fri, 31 May 2019 13:47:05 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1hWhs8-00085C-2b for fwts-devel@lists.ubuntu.com; Fri, 31 May 2019 13:47:04 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 485FA3179B4A for ; Fri, 31 May 2019 13:46:54 +0000 (UTC) Received: from ernunes.brq.redhat.com (unknown [10.43.2.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 873461001959; Fri, 31 May 2019 13:46:53 +0000 (UTC) From: Erico Nunes To: fwts-devel@lists.ubuntu.com Subject: [PATCH] dsddump: fix Package loop condition Date: Fri, 31 May 2019 15:46:39 +0200 Message-Id: <20190531134639.23172-1-ernunes@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 31 May 2019 13:46:57 +0000 (UTC) X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Fix the loop condition on the dsddump test. Without this, dsddump segfaults fwts on platforms with a _DSD. Signed-off-by: Erico Nunes Acked-by: Colin Ian King Acked-by: Alex Hung --- src/acpi/dsddump/dsddump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/acpi/dsddump/dsddump.c b/src/acpi/dsddump/dsddump.c index 611789b3..1e3c26c1 100644 --- a/src/acpi/dsddump/dsddump.c +++ b/src/acpi/dsddump/dsddump.c @@ -87,7 +87,7 @@ static void parse_device_properity(fwts_framework *fw, ACPI_OBJECT *pkg) ACPI_OBJECT *sub_pkg = &element->Package.Elements[1]; uint32_t j; - for (j = 0; i < sub_pkg->Package.Count; j++) + for (j = 0; j < sub_pkg->Package.Count; j++) print_package_element(fw, &sub_pkg->Package.Elements[j]); } else print_package_element(fw, &element->Package.Elements[1]);