Commit 64791571 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Prevent overflow in .rej creation (ITS#2007)

parent c673b651
......@@ -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 */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment