From patchwork Fri Oct 6 13:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 115059 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp1765941qgn; Fri, 6 Oct 2017 06:01:31 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCTsQfQ3MFFKmT18xb88oYRhVqpsEDlNjTzr5sv42i58XxKBtpQ+q3CQ5WDsMANigahar5Y X-Received: by 10.36.249.4 with SMTP id l4mr2423159ith.20.1507294891315; Fri, 06 Oct 2017 06:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507294891; cv=none; d=google.com; s=arc-20160816; b=JrSGet8Xoi9DwLMQHX7enc7f7Xp4eRG95oz1ljT+GpWQhN9EvMmGcA+M6qNhIZTn6R XSmTeyAuYdqsKH48WWZSwfcow8GsSL4o/DQtTKR3C6AYD7Ud5QDyn3IUuaov/2UfInq/ WAL7lB8bYmXSKBxFwDMoqO6laPoIEp4MQ6mslanYOSlMOCB5hA2uKdpBRcUc2TnDuxQM OldHXpe0EoPNfSWU5btkfaPyUPvewo1pMY1tEMFA3jmhqHq2n/CILXeEmJr5q9KrAS/9 S+8wiYSXX2HjX/bGFMT71lSBf3twCnJB9YunvnQfAlL7Ma4hbu5qdk80dHdLUwpvIvxC y0HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=cMbnmTiaxepz0UJNFEDi8AhoVA12uzetAKC78l8kAe0=; b=STJyrL5Nu5A1rEBKn2wq2RtcakjN4Y4IwX1I+ELYbQSQUetpXJVvDmgm8FgPUo8vWb k7kDY/UzhHbcqWr4RHmUZLWLmm2Qa3grJnGqSxb7sfkbRe6x32g/zqASVf/i2ew0k3mu Hl1618ggVoSOpggLJQ9gAIqmjn3w3OPs6Zy8x7BaUCI0SEiehm9E/RsXclkAjFxmg+8j tTgOLhBEFxlE4vWA785EQYK8J9ZYLHJo3Wxdze1hq/fiM4mtYq53c4m5J5DvWYGKeMix uPs8SNFuTw6aNvMvhJ6opJeun19EfwGXm3r1nPVN1bUGoENIY7AGW8OisBsL/2ZiMJ1b CHvg== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f135si1283315itc.83.2017.10.06.06.01.31; Fri, 06 Oct 2017 06:01:31 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id DEA3B6486B; Fri, 6 Oct 2017 13:01:30 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW 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 39DD5644DF; Fri, 6 Oct 2017 13:00:39 +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 7610B644DF; Fri, 6 Oct 2017 13:00:30 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id 519D560972 for ; Fri, 6 Oct 2017 13:00:24 +0000 (UTC) Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 9BE1D40818F0 for ; Fri, 6 Oct 2017 16:00:22 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pHoOcbXVdF-0GeGY2GL; Fri, 06 Oct 2017 16:00:16 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ZZFW2ysosk-0FmaVDBM; Fri, 06 Oct 2017 16:00:15 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 6 Oct 2017 16:00:05 +0300 Message-Id: <1507294806-17851-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507294806-17851-1-git-send-email-odpbot@yandex.ru> References: <1507294806-17851-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 224 Subject: [lng-odp] [PATCH API-NEXT v2 1/2] linux-gen: chksum: correct uninitialized variable bug 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Initialize left_over variable, so that the pad byte is initialized to zero. Signed-off-by: Petri Savolainen --- /** Email created from pull request 224 (psavol:next-ip-checksum) ** https://github.com/Linaro/odp/pull/224 ** Patch: https://github.com/Linaro/odp/pull/224.patch ** Base sha: a2e288f35da1f3838f0650157932a93091e6c3f4 ** Merge commit sha: d1e0b172f4d3ade2a3ba5abe8994ea1013f7eb7d **/ platform/linux-generic/odp_chksum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_chksum.c b/platform/linux-generic/odp_chksum.c index 349bdaf46..a792971ef 100644 --- a/platform/linux-generic/odp_chksum.c +++ b/platform/linux-generic/odp_chksum.c @@ -22,7 +22,7 @@ uint16_t odp_chksum_ones_comp16(const void *p, uint32_t len) /* Add left-over byte, if any */ if (len > 0) { - uint16_t left_over; + uint16_t left_over = 0; *(uint8_t *)&left_over = *(const uint8_t *)data; sum += left_over;