This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new a114dca8c4 Fix possible NPE
a114dca8c4 is described below
commit a114dca8c48aca17361f4fd62f1a513576eaab6a
Author: remm <[email protected]>
AuthorDate: Tue Sep 12 16:12:06 2023 +0200
Fix possible NPE
Found by coverity.
---
java/org/apache/catalina/ssi/SSIEcho.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/ssi/SSIEcho.java
b/java/org/apache/catalina/ssi/SSIEcho.java
index 8ff85ad607..df09cfc4f1 100644
--- a/java/org/apache/catalina/ssi/SSIEcho.java
+++ b/java/org/apache/catalina/ssi/SSIEcho.java
@@ -57,7 +57,8 @@ public class SSIEcho implements SSICommand {
writer.write(ssiMediator.encode(errorMessage,
SSIMediator.ENCODING_ENTITY));
}
}
- String variableValue = ssiMediator.getVariableValue(originalValue,
encoding);
+ String variableValue = (originalValue == null) ? MISSING_VARIABLE_VALUE
+ : ssiMediator.getVariableValue(originalValue, encoding);
if (variableValue == null) {
variableValue = MISSING_VARIABLE_VALUE;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]