]> git.sur5r.net Git - openldap/commitdiff
ITS#2010: use snprintf instead of strcpy to prevent buffer overflow
authorKurt Zeilenga <kurt@openldap.org>
Tue, 6 Aug 2002 19:31:00 +0000 (19:31 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 6 Aug 2002 19:31:00 +0000 (19:31 +0000)
servers/slurpd/sanity.c

index 271b1f1cb4ab5f9614ff73b3aea5623e9a026759..85103257336cff478078f745207bdc0fc8720a4c 100644 (file)
@@ -185,7 +185,7 @@ filecheck(
     char               *p;
     unsigned int       ret = 0;
 
-    strcpy( dir, f );
+       snprintf( dir, sizeof dir, "%s", f );
     p = strrchr( dir, LDAP_DIRSEP[0] );
     if ( p != NULL ) {
        *p = '\0';