From: Vitaly Chikunov Date: Wed, 27 May 2020 14:19:31 +0000 (+0300) Subject: benchmark/sign: Fix crash on incorrect options X-Git-Tag: v3.0.0~93 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=2c36d7d754560065b73d5d6ef01a571573d3f13f;p=openssl-gost%2Fengine.git benchmark/sign: Fix crash on incorrect options Bug found by Clang scan-build. Fixes #258. --- diff --git a/benchmark/sign.c b/benchmark/sign.c index 5c53df7..7696b91 100644 --- a/benchmark/sign.c +++ b/benchmark/sign.c @@ -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':