This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new e94ec495bb Cleanup
e94ec495bb is described below
commit e94ec495bbab9d1b4ce74434301ad1b550c348d2
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 3c069e8028..b950e33546 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]