eclipse-paho / eclipse-paho/paho.mqtt.java

Crash at WebSocketFrame class by ArrayIndexOutOfBoundsException in an InputStream read attempt

Open
#835 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

I am having this issue happening on my app sometimes. The current rate is 4 times by month.

```
Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=119776; regionStart=-1; regionLength=119777
at com.android.org.conscrypt.ArrayUtils.checkOffsetAndCount(ArrayUtils.java:32)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:533)
at org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketFrame.(WebSocketFrame.java:169)
at org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketReceiver.run(WebSocketReceiver.java:103)
at java.lang.Thread.run(Thread.java:919)
```

The `inputStream` might be linked into an `outputStream` as suggested by [this issue](https://stackoverflow.com/questions/19653511/indexoutofboundsexception-when-reading-from-stream)..

Can you guys help me with that?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.