This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new b51d2351cb Avoid NPE (observed in NIO2 tests)
b51d2351cb is described below
commit b51d2351cbee79eb219ac5e6158a9c3a6f345eb3
Author: Mark Thomas <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]