You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2024/09/06 11:32:02 UTC

(tomcat) branch 9.0.x updated: Add null check

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

remm 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 15b2dc0ec6 Add null check
15b2dc0ec6 is described below

commit 15b2dc0ec6f62b20f2f7d16baf5f60e01455d7b8
Author: remm <re...@apache.org>
AuthorDate: Fri Sep 6 13:19:44 2024 +0200

    Add null check
    
    Found by Coverity.
---
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 03aa775cbb..d6e5f83c66 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -289,7 +289,9 @@ class Http2UpgradeHandler extends AbstractStream implements InternalHttpUpgradeH
 
 
     protected void decrementActiveRemoteStreamCount(Stream stream) {
-        setConnectionTimeoutForStreamCount(stream.decrementAndGetActiveRemoteStreamCount());
+        if (stream != null) {
+            setConnectionTimeoutForStreamCount(stream.decrementAndGetActiveRemoteStreamCount());
+        }
     }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org