Skip to content

Commit

Permalink
Merge #21: Add fix for RELIC parsing invalid inputs.
Browse files Browse the repository at this point in the history
adb7110 Add fix for RELIC parsing invalid inputs. (Fuzzbawls)

Pull request description:

  This patch handles RELIC errors when invalid inputs are provided.

  Ref: Chia-Network#249

  Extracted From: #12

ACKs for top commit:
  panleone:
    utACK adb7110
  Liquid369:
    ACK adb7110

Tree-SHA512: 8e9bbf2c4444055c63b17ee9311571ed74ca5c527cc48c49e374c9dd404423383426f0b2bc0aeccf6995d9bd40deb8538f8d7d7429aef4e4d0d9cc6372c9174a
  • Loading branch information
Fuzzbawls committed Apr 18, 2023
2 parents 1446804 + adb7110 commit 5c0be19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ G1Element G1Element::FromBytes(const Bytes& bytes)
}
}
g1_read_bin(ele.p, buffer, G1Element::SIZE + 1);
BLS::CheckRelicErrors();
ele.CheckValid();
return ele;
}
Expand Down Expand Up @@ -241,6 +242,7 @@ G2Element G2Element::FromBytes(const Bytes& bytes)
}

g2_read_bin(ele.q, buffer, G2Element::SIZE + 1);
BLS::CheckRelicErrors();
ele.CheckValid();
return ele;
}
Expand Down

0 comments on commit 5c0be19

Please sign in to comment.