]> git.sur5r.net Git - openldap/commitdiff
Validate timelimit argument
authorKurt Zeilenga <kurt@openldap.org>
Tue, 23 Jan 2001 20:51:14 +0000 (20:51 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 23 Jan 2001 20:51:14 +0000 (20:51 +0000)
clients/tools/ldapsearch.c

index ece0d0485c48d03b12e9a34d1a7db16aca42bcb4..3bf768c88a55ff4aee4b53ae86c2ccbc440463fe 100644 (file)
@@ -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;