From 64791571aa7e8a5006905c42845c26d94f9a0a26 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 5 Aug 2002 19:44:24 +0000 Subject: [PATCH] Prevent overflow in .rej creation (ITS#2007) --- servers/slurpd/reject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/slurpd/reject.c b/servers/slurpd/reject.c index 2596ab57bc..130b828d1e 100644 --- a/servers/slurpd/reject.c +++ b/servers/slurpd/reject.c @@ -57,8 +57,8 @@ write_reject( int rc; ldap_pvt_thread_mutex_lock( &sglob->rej_mutex ); - sprintf( rejfile, "%s" LDAP_DIRSEP "%s:%d.rej", sglob->slurpd_rdir, - ri->ri_hostname, ri->ri_port ); + snprintf( rejfile, sizeof rejfile, "%s" LDAP_DIRSEP "%s:%d.rej", + sglob->slurpd_rdir, ri->ri_hostname, ri->ri_port ); if ( access( rejfile, F_OK ) < 0 ) { /* Doesn't exist - try to create */ -- 2.39.5