This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 706fcc5 Fix BZ 65303. Avoid NPE during error handling
706fcc5 is described below
commit 706fcc54e09011945fb3765d08d326743aa3018b
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 00d2f97..28ec14e 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 5babeb4..b9d231e 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 10.0.7 (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]