From patchwork Wed Jun 29 11:59:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 71184 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp2107418qgy; Wed, 29 Jun 2016 04:59:56 -0700 (PDT) X-Received: by 10.55.192.143 with SMTP id v15mr9460672qkv.23.1467201596479; Wed, 29 Jun 2016 04:59:56 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k6si2768441qkc.101.2016.06.29.04.59.56; Wed, 29 Jun 2016 04:59:56 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 185526805F; Wed, 29 Jun 2016 11:59:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id ABC0567458; Wed, 29 Jun 2016 11:59:52 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1BB1C67458; Wed, 29 Jun 2016 11:59:50 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by lists.linaro.org (Postfix) with ESMTPS id 4773467455 for ; Wed, 29 Jun 2016 11:59:49 +0000 (UTC) Received: by mail-ob0-f173.google.com with SMTP id o10so9105923obp.2 for ; Wed, 29 Jun 2016 04:59:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xRBsxfHdahna/7g49Jb2ICjTRc7kVantbtConOUjZLo=; b=If9SWaIeYhvmLklYs0f5qYyG9BmJmS530wk7ss35g0WtmftzXXGUR2SLFDe9ekD8i5 EDdpMxJj3msUbHURgwhp1/OoEGuIUX8lpHxwio59XI2P2oFGYA+h0jemB3LoO1ps3rLS I2ZdbQq5aLXowlVnuM8E4fHGqSyrsH73m/QIVnv7AY0TDKTeyqtiJTaX/U4dTqqM++qR qOS+tutp6Ui8TyNUNmvQ0iL6JNiYMHrPie3hnHPbbpmp1+6C+EPFR6zwf5tTrXhtQnbt Qt/R0W0cpe5ohV7eaUOdbzX9NDdbH8/Z3UiKA60ZJtgiJg+w1TzJQPuqav2cet27Jacj EGiQ== X-Gm-Message-State: ALyK8tIa0QaeH1wBT7fsFTShc8H84VrtBCN7pwwEzn6SiwCZL2fcbM2j+Ido0DTSaPRqWywRCzE= X-Received: by 10.202.212.70 with SMTP id l67mr5435861oig.175.1467201588672; Wed, 29 Jun 2016 04:59:48 -0700 (PDT) Received: from localhost.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id m80sm1248365oik.6.2016.06.29.04.59.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Jun 2016 04:59:48 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 29 Jun 2016 06:59:41 -0500 Message-Id: <1467201583-4892-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: patch Subject: [lng-odp] [PATCHv3 1/2] validation: queue: avoid out of bounds references X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2377 by correcting loop bounds for error case. Signed-off-by: Bill Fischofer --- test/validation/queue/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c index be9c0dc..96941f4 100644 --- a/test/validation/queue/queue.c +++ b/test/validation/queue/queue.c @@ -84,7 +84,7 @@ void queue_test_capa(void) if (queue[i] == ODP_QUEUE_INVALID) { CU_FAIL("Queue create failed"); - num_queues = i - 1; + num_queues = i; break; }