jitsi/otr4j — pull request #19 by languitar (2014-12-29 17:54:23+00:00)
Title: Improve parsing safety

This pull request improves the safety in parsing encrypted OTR messages by adding checks for supported protocol versions and the amount of bytes read from an OtrInputStream. So far, several conditions were not handled at all and resulted in unexpected error conditions.

This PR depends on #18 and the first commit of this commit is simply the cherry-picked commit from #18. So when merging, this commit needs to be removed in case #18 has been merged before. Without #18, the additional checks in this PR cause the unit tests to fail due to the spec mismatch reported in #18.