Skip to content

Commit 11bef89

Browse files
isle2983real-or-random
authored andcommitted
Cleanse 'bits' variable such that it doesn't get optimized away.
Fixes clang static analysis issue: -------------------------------------------------------------------------------- An issue has been found in ./src/ecmult_gen_impl.h:150:5 Type: Dead assignment Description: Value stored to 'bits' is never read 0: ./src/ecmult_gen_impl.h:153:5 - Value stored to 'bits' is never read --------------------------------------------------------------------------------
1 parent 79b904c commit 11bef89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ecmult_gen_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp25
145145
secp256k1_ge_from_storage(&add, &adds);
146146
secp256k1_gej_add_ge(r, r, &add);
147147
}
148-
bits = 0;
148+
SECP256K1_CLEANSE(bits);
149149
SECP256K1_CLEANSE(add);
150150
SECP256K1_CLEANSE(gnb);
151151
}

0 commit comments

Comments
 (0)