From patchwork Mon Oct 9 08:00:06 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: 115182 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2274969qgn; Mon, 9 Oct 2017 01:02:24 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAhmyfpSAiLKtZ+qvsF2l/+PQHgw1ADwEdFhg0ogs1D07d9IJaiMYA7aLsulkBxCf8uozBn X-Received: by 10.36.4.67 with SMTP id 64mr12116050itb.94.1507536144905; Mon, 09 Oct 2017 01:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507536144; cv=none; d=google.com; s=arc-20160816; b=Qbv0nUHgUb7oyxkrQU9XNwVTUwUP9AZ/52ZZRcx7vSjeXLZD576D96yngNgDaEiT2e 328qwuIYH4Lo0rYKfNFlYwLcbvKrGpnDBmyXkTymHiJFmrxcoBzQX0Lm3kWL6LKfQ701 iqs3IE2Yht+sJT5i9kvb7fqtD4jQY+HtkxiJWl0D3e2O7pBKU3qSyKeOtrlZS4ZO0vCQ gE2M923+KEYiQlciv98wlBGbk6No3G0KogzOy/MCtDbaxAF08ldMdhZdCRCa68Y78stQ JWSTh9eMQf8aZyXDJr+ikbkel3ZtI5cZt/Ty+gztAxOr3T+8Dj8CdkOayH00/OOPM7EZ aeNQ== 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=rIhqJZIeKamumcAtZdaMvILt0jAy2fzhcN+I0oEWXz8=; b=CJ3k20xhU0HUibCPleQxO/DfH3960pwiRS8rG41/SZ6bfoj5nZT6Qu0NLv5azq18CV 6EqqhLJH71/1oV62uNJ8TtalvD3QgzvJCinnv5yKLK3PsRoxwL3H+vT2wZqwN+PnDpZm 9vZp+KTnEn+3658+UyZgjiVPCJ06c0pwuyq0pUcC6dtlQKr8cC7M3ma0fIaF4pn9jRF+ qQaY1wKMCu6cJeNwvwhv+RkEw/zmeW1x8pUrwp7qbOwX7N+kjz46AXiEtqBHRIj/Mk3v klqs2JX/Gyhf+h4GSa1khVDdYlZAcLU9y55mqg6350RO2liLXbgxVa/bD++LGQrHX9lk +gSg== 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 u16si6544447ite.165.2017.10.09.01.02.24; Mon, 09 Oct 2017 01:02:24 -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 6F53060BF1; Mon, 9 Oct 2017 08:02:24 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, 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 B1EB160B15; Mon, 9 Oct 2017 08:01:11 +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 DDF7860B1A; Mon, 9 Oct 2017 08:01:08 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id 4CB4F60BD7 for ; Mon, 9 Oct 2017 08:00:32 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward100j.mail.yandex.net (Yandex) with ESMTP id D5DC35D81342 for ; Mon, 9 Oct 2017 11:00:30 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id kLb1ZslV4w-0Us46e06; Mon, 09 Oct 2017 11:00:30 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Hx5vntxKDE-0Ufa9ago; Mon, 09 Oct 2017 11:00:30 +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: Mon, 9 Oct 2017 11:00:06 +0300 Message-Id: <1507536007-26802-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507536007-26802-1-git-send-email-odpbot@yandex.ru> References: <1507536007-26802-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 224 Subject: [lng-odp] [PATCH API-NEXT v3 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: bf803098eb1518dfb9e719071256fe22700b8c72 ** Merge commit sha: 947cdf84dbec4659ea3c2059299e6a60d314e438 **/ 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;