Avoid another possible null pointer dereference
authorJohn Darrington <john@cellform.com>
Sun, 26 Feb 2023 10:21:24 +0000 (11:21 +0100)
committerJohn Darrington <john@cellform.com>
Sun, 26 Feb 2023 10:22:08 +0000 (11:22 +0100)
* modified:   tests/output/tex-strings.c

tests/output/tex-strings.c

index 71aed143073dbf3dee807dbb33ccc6e3b439bb81..acc2479ce48be0424586c8f3ddb5406930524724 100644 (file)
@@ -108,7 +108,7 @@ main (int argc, char **argv)
         }
     }
 
-  if (optind >= argc)
+  if (!outfile || optind >= argc)
     {
       fprintf (stderr, "Usage: tex-strings  -o <outfile> <infile1> <infile2> ... <infileN>\n");
       return 1;