All of lore.kernel.org
 help / color / mirror / Atom feed
* Reporting bug in mpi_ec_mul_point()
@ 2020-09-28 18:24 Gustavo A. R. Silva
  2020-10-08  5:58 ` [PATCH] lib/mpi: Remove unused scalar_copied Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2020-09-28 18:24 UTC (permalink / raw)
  To: Tianjia Zhang, Xufeng Zhang, Herbert Xu; +Cc: linux-kernel, Gustavo A. R. Silva

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-08  5:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28 18:24 Reporting bug in mpi_ec_mul_point() Gustavo A. R. Silva
2020-10-08  5:58 ` [PATCH] lib/mpi: Remove unused scalar_copied Herbert Xu

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.