From 38d41b98b399f29c8693c41d61f92fdba5d0b58e Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 30 Jul 2021 13:01:52 +0200 Subject: [PATCH] load_roots: properly error out on an invalid option Signed-off-by: Gilles Peskine --- programs/x509/load_roots.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/x509/load_roots.c b/programs/x509/load_roots.c index 69357ff3a..040ef296e 100644 --- a/programs/x509/load_roots.c +++ b/programs/x509/load_roots.c @@ -172,7 +172,11 @@ int main( int argc, char *argv[] ) opt.iterations = atoi( q ) != 0; } else + { mbedtls_printf( "Unknown option: %s\n", p ); + mbedtls_printf( USAGE ); + goto exit; + } } opt.filenames = (const char**) argv + i;