This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 68b9e51 Fix BZ 65303. Avoid NPE during error handling
68b9e51 is described below
commit 68b9e51d046e5c40730316d016bcaf8eb5caeb34
Author: Mark Thomas <[email protected]>
AuthorDate: Thu May 13 14:28:49 2021 +0100
Fix BZ 65303. Avoid NPE during error handling
https://bz.apache.org/bugzilla/show_bug.cgi?id=65303
---
java/org/apache/coyote/http2/Stream.java | 4 +++-
webapps/docs/changelog.xml | 9 +++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/coyote/http2/Stream.java
b/java/org/apache/coyote/http2/Stream.java
index b84c1d4..bfddb44 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -655,7 +655,9 @@ class Stream extends AbstractNonZeroStream implements
HeaderEmitter {
state.sendReset();
handler.sendStreamReset(se);
cancelAllocationRequests();
- inputBuffer.swallowUnread();
+ if (inputBuffer != null) {
+ inputBuffer.swallowUnread();
+ }
} catch (IOException ioe) {
ConnectionException ce = new ConnectionException(
sm.getString("stream.reset.fail"),
Http2Error.PROTOCOL_ERROR, ioe);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b53420e..dd9d369 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,6 +104,15 @@
issues do not "pop up" wrt. others).
-->
<section name="Tomcat 9.0.47 (markt)" rtext="in development">
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <bug>65303</bug>; Fix a possible <code>NullPointerException</code> is
+ an error occurs on an HTTP/1.1 connection being upgraded to HTTP/2 or
on
+ a pushed HTTP/2 stream. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Jasper">
<changelog>
<scode>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]