]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
benchmark/sign: Fix crash on incorrect options
authorVitaly Chikunov <vt@altlinux.org>
Wed, 27 May 2020 14:19:31 +0000 (17:19 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Wed, 27 May 2020 15:22:39 +0000 (18:22 +0300)
Bug found by Clang scan-build.

Fixes #258.

benchmark/sign.c

index 5c53df79abb24e1ad9fa565d841269896385065f..7696b9123273cda6cc3ce5164d59c7c92392716b 100644 (file)
@@ -85,8 +85,6 @@ int main(int argc, char **argv)
        opterr = 0;
        while((option = getopt(argc, argv, "l:c:C")) >= 0)
        {
-               if(option == ':') option = optopt;
-               if(optarg && (optarg[0] == '-')) { optind--; optarg = NULL; }
                switch (option)
                {
                        case 'l':