This is an automated email from the ASF dual-hosted git repository.
remm 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 0f0c1b1fb0 Cleanup
0f0c1b1fb0 is described below
commit 0f0c1b1fb088621dc2668e0d63957997ab38fa87
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 7f4687654c..250d200780 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1280,7 +1280,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]