Fix crash with insufficient parameters to libdcp.
authorCarl Hetherington <cth@carlh.net>
Thu, 10 Jan 2019 13:35:47 +0000 (13:35 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 10 Jan 2019 13:35:47 +0000 (13:35 +0000)
tools/dcpdiff.cc

index af0e18548419a51a989d40f3b7a3c32b73a80398..5e0560a003d72a0dc94092cc93e5b920f49d66bf 100644 (file)
@@ -193,7 +193,7 @@ main (int argc, char* argv[])
                }
        }
 
-       if (argc <= optind || argc > (optind + 2)) {
+       if (argc <= (optind + 1) || argc > (optind + 2)) {
                help (argv[0]);
                exit (EXIT_FAILURE);
        }