mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Prevent overflow in .rej creation (ITS#2007)
This commit is contained in:
parent
c673b651e8
commit
64791571aa
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user