diff options
| author | Mika Lindqvist <postmaster@raasu.org> | 2023-04-26 19:28:43 +0300 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2023-04-28 00:28:13 +0200 |
| commit | 2d5d0a2bafb4314b4310577824b5a949058db404 (patch) | |
| tree | f64e265dc77ae754253b5b692afa84d7f502633f | |
| parent | 4b4377a3623e9fbe08a24fe20233dc3cdefba9ea (diff) | |
| download | Project-Tick-2d5d0a2bafb4314b4310577824b5a949058db404.tar.gz Project-Tick-2d5d0a2bafb4314b4310577824b5a949058db404.zip | |
Fix potential overflow before widening in makecrtc.
| -rw-r--r-- | tools/makecrct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/makecrct.c b/tools/makecrct.c index b5469b7d39..5c3ba58a1a 100644 --- a/tools/makecrct.c +++ b/tools/makecrct.c @@ -93,7 +93,7 @@ static void braid(uint32_t ltl[][256], z_word_t big[][256], int n, int w) { int k; uint32_t i, p, q; for (k = 0; k < w; k++) { - p = x2nmodp((n * w + 3 - k) << 3, 0); + p = x2nmodp(((z_off64_t)n * w + 3 - k) << 3, 0); ltl[k][0] = 0; big[w - 1 - k][0] = 0; for (i = 1; i < 256; i++) { |
