aboutsummaryrefslogtreecommitdiff
path: root/src/ringct
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-06-14 16:08:58 +0200
committerRiccardo Spagni <ric@spagni.net>2019-06-14 16:08:59 +0200
commitc58255ec12491dbc4d8c363280ede7869f447bf9 (patch)
tree7301d251061d44106b1cc5a50778c8a1db86d230 /src/ringct
parentMerge pull request #5633 (diff)
parentrpc: restrict the recent cutoff size in restricted RPC mode (diff)
downloadmonero-c58255ec12491dbc4d8c363280ede7869f447bf9.tar.xz
Merge pull request #5640
542cab02 rpc: restrict the recent cutoff size in restricted RPC mode (moneromooo-monero) 434e617a ensure no NULL is passed to memcpy (moneromooo-monero) 279f1f2c abstract_tcp_server2: improve DoS resistance (moneromooo-monero) 756773e5 serialization: check stream good flag at the end (moneromooo-monero) e3f714aa tree-hash: allocate variable memory on heap, not stack (moneromooo-monero) 67baa3a6 cryptonote: throw on tx hash calculation error (moneromooo-monero) d6bb9ecc serialization: fail on read_varint error (moneromooo-monero) 19490e44 cryptonote_protocol: fix another potential P2P DoS (moneromooo-monero) fa4aa47e cryptonote_protocol: expand basic DoS protection (moneromooo-monero) 3c953d53 cryptonote_protocol_handler: prevent potential DoS (anonimal) b873b69d epee: basic sanity check on allocation size from untrusted source (moneromooo-monero)
Diffstat (limited to 'src/ringct')
-rw-r--r--src/ringct/rctTypes.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h
index e5413f1dc..f8729b872 100644
--- a/src/ringct/rctTypes.h
+++ b/src/ringct/rctTypes.h
@@ -252,7 +252,7 @@ namespace rct {
{
FIELD(type)
if (type == RCTTypeNull)
- return true;
+ return ar.stream().good();
if (type != RCTTypeFull && type != RCTTypeSimple && type != RCTTypeBulletproof && type != RCTTypeBulletproof2)
return false;
VARINT_FIELD(txnFee)
@@ -312,7 +312,7 @@ namespace rct {
ar.delimit_array();
}
ar.end_array();
- return true;
+ return ar.stream().good();
}
};
struct rctSigPrunable {
@@ -325,7 +325,7 @@ namespace rct {
bool serialize_rctsig_prunable(Archive<W> &ar, uint8_t type, size_t inputs, size_t outputs, size_t mixin)
{
if (type == RCTTypeNull)
- return true;
+ return ar.stream().good();
if (type != RCTTypeFull && type != RCTTypeSimple && type != RCTTypeBulletproof && type != RCTTypeBulletproof2)
return false;
if (type == RCTTypeBulletproof || type == RCTTypeBulletproof2)
@@ -429,7 +429,7 @@ namespace rct {
}
ar.end_array();
}
- return true;
+ return ar.stream().good();
}
};