summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMika Lindqvist <postmaster@raasu.org>2023-04-26 19:28:43 +0300
committerHans Kristian Rosbach <hk-git@circlestorm.org>2023-04-28 00:28:13 +0200
commit2d5d0a2bafb4314b4310577824b5a949058db404 (patch)
treef64e265dc77ae754253b5b692afa84d7f502633f /tools
parent4b4377a3623e9fbe08a24fe20233dc3cdefba9ea (diff)
downloadProject-Tick-2d5d0a2bafb4314b4310577824b5a949058db404.tar.gz
Project-Tick-2d5d0a2bafb4314b4310577824b5a949058db404.zip
Fix potential overflow before widening in makecrtc.
Diffstat (limited to 'tools')
-rw-r--r--tools/makecrct.c2
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++) {