aboutsummaryrefslogtreecommitdiff
path: root/src/ringct/bulletproofs.cc
diff options
context:
space:
mode:
authorSChernykh <sergey.v.chernykh@gmail.com>2020-12-08 18:27:19 +0100
committerSChernykh <sergey.v.chernykh@gmail.com>2020-12-08 18:43:44 +0100
commitc0c75ac19d77a542abacd27796364c6518f7ae59 (patch)
tree0c14970ec93dd12072549cece25f150c1a660d37 /src/ringct/bulletproofs.cc
parentMerge pull request #7072 (diff)
downloadmonero-c0c75ac19d77a542abacd27796364c6518f7ae59.tar.xz
Fixed issues found by static analysis
- rolling_median: tried to free uninitialized pointer in a constructor - net_node.inl: erase-remove idiom was used incorrectly. remove_if doesn't actually remove elements, see http://cpp.sh/6fcjv - bulletproofs.cc: call to sizeof() instead of vector.size(), luckily it only impacts performance and not code logic there
Diffstat (limited to 'src/ringct/bulletproofs.cc')
-rw-r--r--src/ringct/bulletproofs.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ringct/bulletproofs.cc b/src/ringct/bulletproofs.cc
index 359dfa879..a6e12c9b3 100644
--- a/src/ringct/bulletproofs.cc
+++ b/src/ringct/bulletproofs.cc
@@ -826,7 +826,7 @@ bool bulletproof_VERIFY(const std::vector<const Bulletproof*> &proofs)
proof_data.reserve(proofs.size());
size_t inv_offset = 0;
std::vector<rct::key> to_invert;
- to_invert.reserve(11 * sizeof(proofs));
+ to_invert.reserve(11 * proofs.size());
size_t max_logM = 0;
for (const Bulletproof *p: proofs)
{