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 0bec63ce33 Fix possible NPE
0bec63ce33 is described below
commit 0bec63ce3374570893fda67329a28b95c73488af
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 59eb42648e..2601b1296b 100644
--- a/java/org/apache/catalina/ssi/SSIEcho.java
+++ b/java/org/apache/catalina/ssi/SSIEcho.java
@@ -60,7 +60,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]