Fix libsnark test failure.
The shorten() method was copying too much into the destination buffer, overflowing it and affecting neighboring data.
This commit is contained in:
parent
d66bf190cb
commit
4a617475ec
|
@ -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…
Reference in New Issue