From e4036af0c859c86266c1004d3957228344a7fc15 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 29 Sep 2007 16:11:28 +0000 Subject: [PATCH] remove potential buffer overflow, now that rids can be up to 4096 --- servers/slapd/syncrepl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" ); } -- 2.39.5