Skip to content

Commit

Permalink
Add fix for RELIC parsing invalid inputs. (Chia-Network#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaranha authored and UdjinM6 committed Dec 1, 2021
1 parent 4d58684 commit a1f0214
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 @@ -70,6 +70,7 @@ G1Element G1Element::FromBytes(const Bytes& bytes, bool fLegacy)
}
g1_read_bin(ele.p, buffer, G1Element::SIZE + 1);
if (!fLegacy) {
BLS::CheckRelicErrors();
ele.CheckValid();
}
return ele;
Expand Down Expand Up @@ -272,6 +273,7 @@ G2Element G2Element::FromBytes(const Bytes& bytes, const bool fLegacy)

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

0 comments on commit a1f0214

Please sign in to comment.