ibauersachs / otr4j

Off-the-Record messaging library for Java
Apache License 2.0
65 stars 42 forks source link

Comply to spec when reading data message old mac keys #18

Closed languitar closed 9 years ago

languitar commented 9 years ago

The "Old MAC keys to be revealed" field is a DATA field according to the OTR protocol specification of all versions. Hence, reading it as a (single) mac address of 20 bytes is wrong in two senses:

  1. it might be empty or contain more than one address, which would be ignored then
  2. a DATA field contains a 4 byte length header, which would be read as the first 4 bytes of the first mac address.

This commit correctly parses the field as a DATA field.

gpolitis commented 9 years ago

I'm closing the PR because I can't merge it without a signed CLA.