aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-25 21:56:39 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-11 13:38:17 +0000
commita129bbd944f717d00cff6ee099c47ecede4dbc3c (patch)
treee536e514f65d5a13777cf4a35d31dfac40d0cd61 /src
parentringct: error out when hashToPoint* returns the point at infinity (diff)
downloadmonero-a129bbd944f717d00cff6ee099c47ecede4dbc3c.tar.xz
multiexp: fix maxscalar off by one
Reported by QuarksLab.
Diffstat (limited to 'src')
-rw-r--r--src/ringct/multiexp.cc2
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;