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 20b07fb4e4 Cleanup
20b07fb4e4 is described below
commit 20b07fb4e41cfa593de0fe77e761483dce27d28f
Author: remm <[email protected]>
AuthorDate: Mon Sep 11 16:11:25 2023 +0200
Cleanup
Found by coverity.
---
java/org/apache/catalina/servlets/DefaultServlet.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 3c33628b60..1ba7b3e637 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1310,7 +1310,10 @@ public class DefaultServlet extends HttpServlet {
is.reset();
if (stripBom) {
while (skip-- > 0) {
- is.read();
+ if (is.read() < 0) {
+ // Ignore since included
+ break;
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]