From 559228af5b22df7af64950e70cc62efbc1f15a9d Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 24 Feb 2014 14:19:43 -0800 Subject: [PATCH] Fix for bug modifying immutable list. --- .../org/whispersystems/textsecure/storage/SessionRecordV2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/org/whispersystems/textsecure/storage/SessionRecordV2.java b/library/src/org/whispersystems/textsecure/storage/SessionRecordV2.java index 6a0fdb6ce4..e4c5ba39f7 100644 --- a/library/src/org/whispersystems/textsecure/storage/SessionRecordV2.java +++ b/library/src/org/whispersystems/textsecure/storage/SessionRecordV2.java @@ -338,7 +338,7 @@ public class SessionRecordV2 extends Record { return null; } - List messageKeyList = chain.getMessageKeysList(); + List messageKeyList = new LinkedList(chain.getMessageKeysList()); Iterator messageKeyIterator = messageKeyList.iterator(); MessageKeys result = null;