Skip to content
Snippets Groups Projects
Commit 64791571 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Prevent overflow in .rej creation (ITS#2007)

parent c673b651
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment