Skip to content

Commit

Permalink
libosdp: data_trace: Fix bug in packet length passed to tracer
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Feb 17, 2024
1 parent 924958b commit f362833
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/osdp_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,9 +676,7 @@ int osdp_phy_decode_packet(struct osdp_pd *pd, uint8_t **pkt_start)
memmove(pkt->data, data, len);
*pkt_start = pkt->data;

pkt->data[len + 0] = 0; /* CRC16/Checksum */
pkt->data[len + 1] = 0; /* CRC16/Checksum */
len += sizeof(struct osdp_packet_header) + 2;
len += sizeof(struct osdp_packet_header);
pkt->control &= ~PKT_CONTROL_SCB;
pkt->control |= PKT_TRACE_MANGLED;
pkt->len_lsb = BYTE_0(len);
Expand Down

0 comments on commit f362833

Please sign in to comment.