mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 03:46:47 +00:00
Block until all UUID bytes are read or EOF
This commit is contained in:
1 parent
1dda015c6a
commit
becf6afbdd
1 file changed
+2
-2
+2
-2
@@ -78,13 +78,13 @@ public class MultiRecipientMessageProvider implements MessageBodyReader<MultiRec
|
||||
private UUID readUuid(InputStream stream) throws IOException {
|
||||
byte[] buffer = new byte[8];
|
||||
|
||||
int read = stream.read(buffer);
|
||||
int read = stream.readNBytes(buffer, 0, 8);
|
||||
if (read != 8) {
|
||||
throw new IOException("Insufficient bytes for UUID");
|
||||
}
|
||||
long msb = convertNetworkByteOrderToLong(buffer);
|
||||
|
||||
read = stream.read(buffer);
|
||||
read = stream.readNBytes(buffer, 0, 8);
|
||||
if (read != 8) {
|
||||
throw new IOException("Insufficient bytes for UUID");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user