Skip to content

Commit f157dd9

Browse files
committed
Fixed uninitialized key array.
1 parent fe62dc7 commit f157dd9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

algorithm.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ static cl_int queue_whirlcoin_kernel(struct __clState *clState, struct _dev_blk_
638638

639639
static cl_int queue_whirlpoolx_kernel(struct __clState *clState, struct _dev_blk_ctx *blk, __maybe_unused cl_uint threads)
640640
{
641-
uint64_t midblock[8], key[8], tmp[8] = { 0 };
641+
uint64_t midblock[8], key[8] = { 0 }, tmp[8] = { 0 };
642642
cl_ulong le_target;
643643
cl_int status;
644644

@@ -648,8 +648,7 @@ static cl_int queue_whirlpoolx_kernel(struct __clState *clState, struct _dev_blk
648648
memcpy(midblock, clState->cldata, 64);
649649

650650
// midblock = n, key = h
651-
for (int i = 0; i < 10; ++i)
652-
{
651+
for (int i = 0; i < 10; ++i) {
653652
tmp[0] = WHIRLPOOL_ROUND_CONSTANTS[i];
654653
whirlpool_round(key, tmp);
655654
tmp[0] = 0;

0 commit comments

Comments
 (0)