You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/10/17 19:17:50 UTC
[tomcat] branch master updated: Fix possible NPE with excessive
header size
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 3d73dfc Fix possible NPE with excessive header size
3d73dfc is described below
commit 3d73dfc42e13a5d0eeb4c0e50009cdb67e1ab7dd
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Oct 17 20:17:27 2019 +0100
Fix possible NPE with excessive header size
---
java/org/apache/coyote/http11/Http11Processor.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java
index faeb762..24fd9e9 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -995,7 +995,10 @@ public class Http11Processor extends AbstractProcessor {
Enumeration<String> values = headers.values(Constants.CONNECTION);
Set<String> result = new HashSet<>();
while (values.hasMoreElements()) {
- TokenList.parseTokenList(new StringReader(values.nextElement()), result);
+ String nextHeaderValue = values.nextElement();
+ if (nextHeaderValue != null) {
+ TokenList.parseTokenList(new StringReader(nextHeaderValue), result);
+ }
}
return result.contains(token);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org