浏览代码

Fix over-allocated bounds on bn_mul_part_recursive.

Same mistake as bn_mul_recursive.

Change-Id: I2374d37e5da61c82ccb1ad79da55597fa3f10640
Reviewed-on: https://boringssl-review.googlesource.com/25405
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 6 年前
committed by CQ bot account: commit-bot@chromium.org
父节点
当前提交
6488f4e2ba
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. +1
    -3
      crypto/fipsmodule/bn/mul.c

+ 1
- 3
crypto/fipsmodule/bn/mul.c 查看文件

@@ -597,10 +597,8 @@ static int bn_mul_impl(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
// We know |al| and |bl| are at most one from each other, so if al > j,
// bl >= j, and vice versa. Thus we can use |bn_mul_part_recursive|.
assert(al >= j && bl >= j);
// TODO(davidben): Check that these are correctly-sized, after rewriting
// |bn_mul_part_recursive|.
if (!bn_wexpand(t, j * 8) ||
!bn_wexpand(rr, j * 8)) {
!bn_wexpand(rr, j * 4)) {
goto err;
}
bn_mul_part_recursive(rr->d, a->d, b->d, j, al - j, bl - j, t->d);


正在加载...
取消
保存