From 30aff823414b1d35ec79e6f3b530cd2ec22a3720 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 24 Nov 2014 11:37:28 -0800 Subject: [PATCH] The future is the other direction. // FREEBIE --- .../main/java/org/whispersystems/libaxolotl/SessionCipher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libaxolotl/src/main/java/org/whispersystems/libaxolotl/SessionCipher.java b/libaxolotl/src/main/java/org/whispersystems/libaxolotl/SessionCipher.java index 43e90d3c78..13bdc25b79 100644 --- a/libaxolotl/src/main/java/org/whispersystems/libaxolotl/SessionCipher.java +++ b/libaxolotl/src/main/java/org/whispersystems/libaxolotl/SessionCipher.java @@ -324,7 +324,7 @@ public class SessionCipher { } } - if (chainKey.getIndex() - counter > 2000) { + if (counter - chainKey.getIndex() > 2000) { throw new InvalidMessageException("Over 2000 messages into the future!"); }