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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
     new c5a1764d66 Avoid NPE (observed in NIO2 tests)
c5a1764d66 is described below

commit c5a1764d66387a10b0553882319752371a44f583
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Sep 1 13:50:53 2022 +0100

    Avoid NPE (observed in NIO2 tests)
---
 java/org/apache/coyote/http11/filters/BufferedInputFilter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java 
b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
index 5bfe6c9c61..7aa9f2da78 100644
--- a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
+++ b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
@@ -120,7 +120,7 @@ public class BufferedInputFilter implements InputFilter, 
ApplicationBufferHandle
     @Override
     public void recycle() {
         if (buffered != null) {
-            if (buffered.getBuffer().length > 65536) {
+            if (buffered.getBuffer() != null && buffered.getBuffer().length > 
65536) {
                 buffered = null;
             } else {
                 buffered.recycle();


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

Reply via email to