Check the result of blst_p2_uncompress (#297)
This commit is contained in:
parent
ecb5499077
commit
5703f6f353
|
@ -1786,7 +1786,13 @@ C_KZG_RET load_trusted_setup(
|
|||
|
||||
/* Convert all g2 bytes to g2 points */
|
||||
for (i = 0; i < n2; i++) {
|
||||
blst_p2_uncompress(&g2_affine, &g2_bytes[BYTES_PER_G2 * i]);
|
||||
BLST_ERROR err = blst_p2_uncompress(
|
||||
&g2_affine, &g2_bytes[BYTES_PER_G2 * i]
|
||||
);
|
||||
if (err != BLST_SUCCESS) {
|
||||
ret = C_KZG_BADARGS;
|
||||
goto out_error;
|
||||
}
|
||||
blst_p2_from_affine(&out->g2_values[i], &g2_affine);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue