diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-07-25 21:56:39 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-09-11 13:38:17 +0000 |
commit | a129bbd944f717d00cff6ee099c47ecede4dbc3c (patch) | |
tree | e536e514f65d5a13777cf4a35d31dfac40d0cd61 /src/ringct/multiexp.cc | |
parent | ringct: error out when hashToPoint* returns the point at infinity (diff) | |
download | monero-a129bbd944f717d00cff6ee099c47ecede4dbc3c.tar.xz |
multiexp: fix maxscalar off by one
Reported by QuarksLab.
Diffstat (limited to '')
-rw-r--r-- | src/ringct/multiexp.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ringct/multiexp.cc b/src/ringct/multiexp.cc index b05840322..901b00edd 100644 --- a/src/ringct/multiexp.cc +++ b/src/ringct/multiexp.cc @@ -605,7 +605,7 @@ rct::key pippenger(const std::vector<MultiexpData> &data, const std::shared_ptr< maxscalar = data[i].scalar; } size_t groups = 0; - while (groups < 256 && pow2(groups) < maxscalar) + while (groups < 256 && !(maxscalar < pow2(groups))) ++groups; groups = (groups + c - 1) / c; |