Commit 0d8680f2 authored by npzacs's avatar npzacs

Fix undefined shift

parent 9cf9a821
......@@ -231,7 +231,7 @@ static void _calc_pk(const uint8_t *dk, uint8_t *pk, uint32_t uv, uint32_t v_mas
}
uint8_t curr_key[16];
if (!(uv & (1ul << i))) {
if (i < 0 || !(uv & (1ul << i))) {
memcpy(curr_key, left_child, 16);
} else {
memcpy(curr_key, right_child, 16);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment