From: Kurt Zeilenga Date: Tue, 6 Aug 2002 19:31:00 +0000 (+0000) Subject: ITS#2010: use snprintf instead of strcpy to prevent buffer overflow X-Git-Tag: NO_SLAP_OP_BLOCKS~1270 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f1047b704efa80ca99b4e7a067252acbb1240ee8;p=openldap ITS#2010: use snprintf instead of strcpy to prevent buffer overflow --- diff --git a/servers/slurpd/sanity.c b/servers/slurpd/sanity.c index 271b1f1cb4..8510325733 100644 --- a/servers/slurpd/sanity.c +++ b/servers/slurpd/sanity.c @@ -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';