postgres-async-driver icon indicating copy to clipboard operation
postgres-async-driver copied to clipboard

Error swallowed when message is longer than 255 characters

Open RyanHoldren opened this issue 8 years ago • 0 comments

In ErrorResponseDecoder::read() the temporary buffer is only 255 bytes long, which causes an ArrayIndexOutOfBoundsException whenever the error message is longer than that.

https://github.com/alaisi/postgres-async-driver/blob/71e761c677db1ce1c2b7a57b96a528ace18d61b6/src/main/java/com/github/pgasync/impl/io/ErrorResponseDecoder.java#L55

Unfortunately for me, the out of bounds exception was silently swallowed for some reason - in other words, no error signal from the Observable - which made this was pretty tricky to debug.

RyanHoldren avatar Oct 10 '17 00:10 RyanHoldren