This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 3b940b4b868f70897653facbdab9221dc1b20c27
Author: Mark Thomas <ma...@apache.org>
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 f4e2b0f..becf334 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -614,7 +614,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 6ac3c3d..849cbc1 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 8.5.67 (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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to