From f1047b704efa80ca99b4e7a067252acbb1240ee8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 6 Aug 2002 19:31:00 +0000 Subject: [PATCH] ITS#2010: use snprintf instead of strcpy to prevent buffer overflow --- servers/slurpd/sanity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; -- 2.39.5