Skip to content

Commit

Permalink
lib: endianness of cid was changed with fix for init parsing
Browse files Browse the repository at this point in the history
this caused issues on some u2f devices
fixes Yubico#115
  • Loading branch information
klali committed Mar 6, 2019
1 parent ce9f3db commit 1081a0f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions u2f-host/devs.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,8 @@ init_device (u2fh_devs * devs, struct u2fdevice *dev)
return U2FH_TRANSPORT_ERROR;
}

dev->cid =
resp[offs] << 24 | resp[offs + 1] << 16 | resp[offs +
2] << 8 | resp[offs +
3];

memcpy((uint8_t*)&dev->cid, resp + offs, sizeof(dev->cid));
offs += 4;
dev->versionInterface = resp[offs++];
dev->versionMajor = resp[offs++];
Expand Down

0 comments on commit 1081a0f

Please sign in to comment.