From aef030e78ac96fc24ccb3de3af3b863921dfa557 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Wed, 30 Nov 2022 01:04:27 +0100 Subject: [PATCH] cplusplus: add missing argc check in resize example (#3200) --- cplusplus/examples/resize.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cplusplus/examples/resize.cpp b/cplusplus/examples/resize.cpp index fb2a47ac..6403f86f 100644 --- a/cplusplus/examples/resize.cpp +++ b/cplusplus/examples/resize.cpp @@ -13,6 +13,9 @@ main( int argc, char **argv ) if( VIPS_INIT( argv[0] ) ) vips_error_exit( NULL ); + if( argc != 3 ) + vips_error_exit( "usage: %s infile outfile", argv[0] ); + VImage in = VImage::new_from_file( argv[1], VImage::option() ->set( "access", "sequential" ) );