mirror of
https://github.com/monero-project/monero.git
synced 2025-07-30 09:18:44 -04:00
fix a couple bugs found by OSS-fuzz
- index out of bounds when importing outputs - accessing invalid CLSAG data
This commit is contained in:
parent
d27d4526fe
commit
9e6187a736
2 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue