diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-08-07 19:33:48 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-08-07 19:33:48 +0100 |
commit | 158f7ee8919929b4daefb484d1a232d367d0c8e5 (patch) | |
tree | fef272b93ba190aa8400076b087c5b9642bcd43c /src | |
parent | a4b2927884ded37556ea5009e10fffe12d8a6706 (diff) |
Fix crash where the message length was shorter than the length of the mac
Diffstat (limited to 'src')
-rw-r--r-- | src/message.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/message.cpp b/src/message.cpp index ffb9f6c..f98dfe5 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -213,6 +213,7 @@ void olm::decode_message( reader.ciphertext_length = 0; if (pos == end) return; + if (input_length < mac_length) return; reader.version = *(pos++); while (pos != end) { |