aboutsummaryrefslogtreecommitdiff
path: root/src/ringct
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-09-25 18:17:53 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-09-25 18:17:53 -0500
commitd65f9a3064ca8b99451387a490ef4b230b5d7d3b (patch)
tree7fc080349f8d04cf309d88d6c241194963634c69 /src/ringct
parentMerge pull request #6835 (diff)
parentfix a couple bugs found by OSS-fuzz (diff)
downloadmonero-d65f9a3064ca8b99451387a490ef4b230b5d7d3b.tar.xz
Merge pull request #6842
9e6187a fix a couple bugs found by OSS-fuzz (moneromooo-monero)
Diffstat (limited to 'src/ringct')
-rw-r--r--src/ringct/rctTypes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h
index e073bb61b..00b72123a 100644
--- a/src/ringct/rctTypes.h
+++ b/src/ringct/rctTypes.h
@@ -368,6 +368,12 @@ namespace rct {
template<bool W, template <bool> class Archive>
bool serialize_rctsig_prunable(Archive<W> &ar, uint8_t type, size_t inputs, size_t outputs, size_t mixin)
{
+ if (inputs >= 0xffffffff)
+ return false;
+ if (outputs >= 0xffffffff)
+ return false;
+ if (mixin >= 0xffffffff)
+ return false;
if (type == RCTTypeNull)
return ar.stream().good();
if (type != RCTTypeFull && type != RCTTypeSimple && type != RCTTypeBulletproof && type != RCTTypeBulletproof2 && type != RCTTypeCLSAG)