From: Pierangelo Masarati Date: Sat, 29 Sep 2007 16:11:28 +0000 (+0000) Subject: remove potential buffer overflow, now that rids can be up to 4096 X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~582 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e4036af0c859c86266c1004d3957228344a7fc15;p=openldap remove potential buffer overflow, now that rids can be up to 4096 --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index a657088bed..11e38ac36f 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -3002,7 +3002,7 @@ nonpresent_callback( } else if ( rs->sr_type == REP_SEARCH ) { if ( !( si->si_refreshDelete & NP_DELETE_ONE ) ) { - char buf[sizeof("rid=000 not")]; + char buf[sizeof("rid=4096 not")]; a = attr_find( rs->sr_entry->e_attrs, slap_schema.si_ad_entryUUID ); @@ -3012,7 +3012,7 @@ nonpresent_callback( } if ( slap_debug & LDAP_DEBUG_SYNC ) { - sprintf( buf, "%s %s", si->si_ridtxt, + snprintf( buf, sizeof(buf), "%s %s", si->si_ridtxt, present_uuid ? "got" : "not" ); }