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 4dfebd2348 Fix possible NPE
4dfebd2348 is described below

commit 4dfebd23484aa49f012e27cba4be94a64a606cd2
Author: remm <r...@apache.org>
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to