Commit f8e5f981859f87cbb0ca82e03f66c06571078093

Authored by Loic Dachary
2 parents 4add4fc4 39612c75
Exists in v2

Merge branch 'wip-signed-integer-overflow-cppcheck-v2' into 'v2'

Resolve cppcheck Signed integer overflow error

See merge request !9
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/reed_sol.c
... ... @@ -136,7 +136,7 @@ static gf_t GF32;
136 136 void reed_sol_galois_w32_region_multby_2(char *region, int nbytes)
137 137 {
138 138 if (prim32 == -1) {
139   - prim32 = galois_single_multiply((1 << 31), 2, 32);
  139 + prim32 = galois_single_multiply(((gf_val_32_t)1 << 31), 2, 32);
140 140 if (!gf_init_hard(&GF32, 32, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
141 141 prim32, 0, 0, NULL, NULL)) {
142 142 fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w32_region_multby_2\n");
... ...