Skip to content

Commit

Permalink
Keeloq encoder: clean data array.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Jan 22, 2023
1 parent 9d020c0 commit 118af1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocols/keeloq.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static void build_message(RawSamplesBuffer *samples, ProtoViewFieldSet *fieldset
raw_samples_add(samples,false,te*9);

// Data, 66 bits.
uint8_t data[9];
uint8_t data[9] = {0};
memcpy(data,fieldset->fields[0]->bytes,4); // Encrypted part.
memcpy(data+4,fieldset->fields[1]->bytes,4); // ID.
data[7] = data[7]>>4 | fieldset->fields[2]->uvalue << 4; // s[2,1,0,3]
Expand Down

0 comments on commit 118af1a

Please sign in to comment.