From: Kurt Zeilenga Date: Tue, 23 Jan 2001 20:51:14 +0000 (+0000) Subject: Validate timelimit argument X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1534 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6b822b67ef926d68cc667439ce0cfab6d6fd76fd;p=openldap Validate timelimit argument --- diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index ece0d0485c..3bf768c88a 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -222,6 +222,11 @@ main( int argc, char **argv ) break; case 'l': /* time limit */ timelimit = atoi( optarg ); + if( timelimit < 0 ) { + fprintf( stderr, "%s: invalid timelimit (%d) specified\n", + prog, timelimit ); + return EXIT_FAILURE; + } break; case 'L': /* print entries in LDIF format */ ++ldif;