Commit d02f02e0a7 for openssl.org

commit d02f02e0a774db4a5eb30bc7459dc116f7d70fb6
Author: Bob Beck <beck@openssl.org>
Date:   Fri Mar 27 15:34:16 2026 -0600

    Don't eat a NULL if a queryfile is not provided

    Fixes: 18cd23df8a8f2 "Remove "noise" comments from TS files."

    Reviewed-by: Paul Dale <paul.dale@oracle.com>
    Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
    MergeDate: Tue Mar 31 09:51:38 2026
    (Merged from https://github.com/openssl/openssl/pull/30608)

diff --git a/apps/ts.c b/apps/ts.c
index 6cfac28dda..f231f16ef9 100644
--- a/apps/ts.c
+++ b/apps/ts.c
@@ -339,7 +339,7 @@ int ts_main(int argc, char **argv)
         if ((in != NULL) && (queryfile != NULL))
             goto opthelp;
         if (in == NULL) {
-            if ((conf == NULL) || (token_in != 0))
+            if (conf == NULL || token_in != 0 || queryfile == NULL)
                 goto opthelp;
         }
         ret = !reply_command(conf, section, queryfile,