pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #3500: fix: ArrayIndexOutOfBounds when write big object into GSS enabled connection, make GSSInputStream robust in face of streams that produce incomplete reads
Date: Mon, 27 Jan 2025 14:34:47 +0000
Message-ID: <[email protected]> (raw)

This is a re-implementation of https://github.com/pgjdbc/pgjdbc/pull/3492

```
java.lang.ArrayIndexOutOfBoundsException: null
at java.security.jgss/sun.security.jgss.GSSContextImpl.unwrap
at sun.security.jgss.GSSContextImpl.wrap(GSSContextImpl.java:385)
at org.postgresql.gss.GSSOutputStream.writeWrapped(GSSOutputStream.java:52)
at org.postgresql.gss.GSSOutputStream.write(GSSOutputStream.java:76)
at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
at org.postgresql.core.PGStream.send(PGStream.java:398)
```

GSSOutputStream does not handle the buffer switch correctly, when a message is bigger than the GSS buffer due to a wrong buffer variable usage.

GSSInputStream did not handle input streams that produced incomplete reads as it ignored the result of .read(...)


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] PR #3500: fix: ArrayIndexOutOfBounds when write big object into GSS enabled connection, make GSSInputStream robust in face of streams that produce incomplete reads
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox