From 158f7ee8919929b4daefb484d1a232d367d0c8e5 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Fri, 7 Aug 2015 19:33:48 +0100 Subject: Fix crash where the message length was shorter than the length of the mac --- src/message.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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) { -- cgit v1.2.3