Skip to content

Commit

Permalink
Add fix for RELIC parsing invalid inputs. (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaranha authored and hoffmang9 committed Jul 16, 2021
1 parent 7febf5b commit 0732648
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 @@ -243,6 +244,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 0732648

Please sign in to comment.