From 5bd60dd6d6a6ec5b6a01a27f9a95b777e1dadf9e Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Wed, 15 Mar 2023 12:01:15 +0100 Subject: [PATCH] Closes #158 --- .../java/org/cryptomator/cryptofs/ch/CleartextFileChannel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/cryptomator/cryptofs/ch/CleartextFileChannel.java b/src/main/java/org/cryptomator/cryptofs/ch/CleartextFileChannel.java index b1c9039a..436dde78 100644 --- a/src/main/java/org/cryptomator/cryptofs/ch/CleartextFileChannel.java +++ b/src/main/java/org/cryptomator/cryptofs/ch/CleartextFileChannel.java @@ -93,7 +93,7 @@ protected boolean isReadable() { } @Override - protected int readLocked(ByteBuffer dst, long position) throws IOException { + protected synchronized int readLocked(ByteBuffer dst, long position) throws IOException { int origLimit = dst.limit(); long limitConsideringEof = fileSize.get() - position; if (limitConsideringEof < 1) {