Browse Source

Fix libsnark test failure.

The shorten() method was copying too much into the destination
buffer, overflowing it and affecting neighboring data.
pull/4/head
syd 7 years ago
committed by Jack Grigg
parent
commit
4a617475ec
No known key found for this signature in database GPG Key ID: 665DBCD284F7DAFF
  1. 2
      src/snark/src/algebra/fields/bigint.tcc

2
src/snark/src/algebra/fields/bigint.tcc

@ -201,7 +201,7 @@ inline bigint<m> bigint<n>::shorten(const bigint<m>& q, const char *msg) const
}
}
bigint<m> res;
mpn_copyi(res.data, data, n);
mpn_copyi(res.data, data, m);
res.limit(q, msg);
return res;
}

Loading…
Cancel
Save