]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapmodify.c
ITS#7497 fix lineno overflow in ldif_read_record()
[openldap] / clients / tools / ldapmodify.c
index 2305bd756b95cb67962768f037d05bab8a4bf32c..d35504e321967fbfc342bcda68169a30bd9af314 100644 (file)
@@ -73,7 +73,7 @@ static int    ldapadd;
 static char *rejfile = NULL;
 static LDAP    *ld = NULL;
 
-static int process_ldif_rec LDAP_P(( char *rbuf, int lineno ));
+static int process_ldif_rec LDAP_P(( char *rbuf, unsigned long lineno ));
 static int domodify LDAP_P((
        const struct berval *dn,
        LDAPMod **pmods,
@@ -220,8 +220,8 @@ main( int argc, char **argv )
        char            *matched_msg, *error_msg;
        int             rc, retval, ldifrc;
        int             len;
-       int             i = 0;
-       int             lineno, nextline = 0, lmax = 0;
+       int             i = 0, lmax = 0;
+       unsigned long   lineno, nextline = 0;
        LDAPControl     c[1];
 
        prog = lutil_progname( "ldapmodify", argc, argv );
@@ -377,7 +377,7 @@ fail:;
 
 
 static int
-process_ldif_rec( char *rbuf, int linenum )
+process_ldif_rec( char *rbuf, unsigned long linenum )
 {
        LDIFRecord lr;
        int lrflags = ldapadd ? LDIF_DEFAULT_ADD : 0;