diff options
| author | Alexander Blair <snipa@jagtech.io> | 2020-09-27 16:17:17 -0700 |
|---|---|---|
| committer | Alexander Blair <snipa@jagtech.io> | 2020-09-27 16:17:17 -0700 |
| commit | 3cbb44a2fd79ce9c667006e2e42e61513993e59a (patch) | |
| tree | fbb2d9f86de021996c3104e252d1d89b00a52e5a /src/ringct | |
| parent | 2e83628d02199c8c371ce5792e5f08c7a090ab16 (diff) | |
| parent | b6c4f8cd545a033859d3f7e91949f4883b856ed6 (diff) | |
| download | monzero-core-3cbb44a2fd79ce9c667006e2e42e61513993e59a.tar.gz monzero-core-3cbb44a2fd79ce9c667006e2e42e61513993e59a.tar.xz monzero-core-3cbb44a2fd79ce9c667006e2e42e61513993e59a.zip | |
Merge pull request #6841
b6c4f8cd5 fix a couple bugs found by OSS-fuzz (moneromooo-monero)
Diffstat (limited to 'src/ringct')
| -rw-r--r-- | src/ringct/rctTypes.h | 6 |
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) |
