All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>,
	Xufeng Zhang <yunbo.xufeng@linux.alibaba.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>
Subject: Reporting bug in mpi_ec_mul_point()
Date: Mon, 28 Sep 2020 13:24:38 -0500	[thread overview]
Message-ID: <20200928182438.GA11739@embeddedor> (raw)

Hi all,

I'm reporting the following bug detected by Coverity:

The _scalar_copied_ variable is set to 0 at

lib/mpi/ec.c:1255:
1255                 int scalar_copied = 0;

and it is never updated before reaching the code below:

lib/mpi/ec.c:1317
1317                 if (scalar_copied)                                                         
1318                         mpi_free(scalar);

This code was introduced by commit d58bb7e55a8a ("lib/mpi: Introduce ec
implementation to MPI library")

Any ideas on what's the right solution for this?

Thanks
--
Gustavo

             reply	other threads:[~2020-09-28 18:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 18:24 Gustavo A. R. Silva [this message]
2020-10-08  5:58 ` [PATCH] lib/mpi: Remove unused scalar_copied Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200928182438.GA11739@embeddedor \
    --to=gustavoars@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tianjia.zhang@linux.alibaba.com \
    --cc=yunbo.xufeng@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.