Browse Source

fix obviously wrong check in decode_packet()

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
tags/v1.1
Oliver Hartkopp 4 years ago
parent
commit
b4663c9155
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      drmdecrypt.c

+ 2
- 2
drmdecrypt.c View File

@@ -245,13 +245,13 @@ int decode_packet(unsigned char *data, unsigned char *outdata)
trace(TRC_DEBUG, "Contains payload : 0x%x", data[3] & 0x10);
trace(TRC_DEBUG, "Continuity counter : 0x%x", data[3] & 0x0f);

if((data[3] & 0x20) == 0x01)
if(data[3] & 0x20)
trace(TRC_DEBUG, "Adaptation Field length: 0x%x", data[4]+1);

offset=4;

/* skip adaption field */
if((data[3] & 0x20) == 0x01)
if(data[3] & 0x20)
offset += (data[4]+1);

/* remove scrambling bits */

Loading…
Cancel
Save