aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-07 22:41:21 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-07 22:41:21 +0000
commit3b00527500b08859a75cf94a78c55656bcc2f99e (patch)
tree71f8e8ae284bb7129f07db7dafb977a196edef28
parentringct: guard against bad data exceptions in worker threads (diff)
downloadmonero-3b00527500b08859a75cf94a78c55656bcc2f99e.tar.xz
ringct: add sc_check calls in MLSAG_Ver for ss and cc
luigi1111's recommendation
-rw-r--r--src/ringct/rctSigs.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ringct/rctSigs.cpp b/src/ringct/rctSigs.cpp
index 0727c6be6..b7b4466bb 100644
--- a/src/ringct/rctSigs.cpp
+++ b/src/ringct/rctSigs.cpp
@@ -259,6 +259,11 @@ namespace rct {
}
CHECK_AND_ASSERT_MES(dsRows <= rows, false, "Bad dsRows value");
+ for (size_t i = 0; i < rv.ss.size(); ++i)
+ for (size_t j = 0; j < rv.ss[i].size(); ++j)
+ CHECK_AND_ASSERT_MES(sc_check(rv.ss[i][j].bytes) == 0, false, "Bad ss slot");
+ CHECK_AND_ASSERT_MES(sc_check(rv.cc.bytes) == 0, false, "Bad cc");
+
size_t i = 0, j = 0, ii = 0;
key c, L, R, Hi;
key c_old = copy(rv.cc);