diff options
author | Jack Lloyd <[email protected]> | 2018-02-25 12:23:41 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-02-25 12:23:41 -0500 |
commit | 4536e240238d0b0ecb896c11978b58df108a6ad3 (patch) | |
tree | 451605f4f7a3a64b919fcd2f9460f13a87fef3c4 /src/lib/math/bigint/big_ops3.cpp | |
parent | 896fd7d5d3ef2c4d546fbf0fecb1b1201d022202 (diff) |
Pass workspace size to various bigint_ functions
These functions made assumptions about the workspace size available,
which if incorrect would cause memory corruption. Since the length is
always available at the caller, just provide it and avoid problems.
Diffstat (limited to 'src/lib/math/bigint/big_ops3.cpp')
-rw-r--r-- | src/lib/math/bigint/big_ops3.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/math/bigint/big_ops3.cpp b/src/lib/math/bigint/big_ops3.cpp index 680eca635..8bff790a6 100644 --- a/src/lib/math/bigint/big_ops3.cpp +++ b/src/lib/math/bigint/big_ops3.cpp @@ -95,7 +95,7 @@ BigInt operator*(const BigInt& x, const BigInt& y) else if(x_sw && y_sw) { secure_vector<word> workspace(z.size()); - bigint_mul(z, x, y, workspace.data()); + bigint_mul(z, x, y, workspace.data(), workspace.size()); } if(x_sw && y_sw && x.sign() != y.sign()) |