From: Kurt Zeilenga Date: Sat, 18 Oct 2003 02:33:15 +0000 (+0000) Subject: Fix modify attrs= overflow bug X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~558 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e3a01483287ced40eca8a8eccf13c5b6bac3bf1c;p=openldap Fix modify attrs= overflow bug --- diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index ac412159c1..dda14a3127 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -316,8 +316,15 @@ do_modify( if (len + 1 + tmp->sml_type.bv_len > sizeof(abuf)) { Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu MOD attr=%s\n", op->o_connid, op->o_opid, abuf, 0, 0 ); - len = 0; + + len = 0; ptr = abuf; + + if( 1 + tmp->sml_type.bv_len > sizeof(abuf)) { + Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu MOD attr=%s\n", + op->o_connid, op->o_opid, tmp->sml_type.bv_val, 0, 0 ); + continue; + } } if (len) { *ptr++ = ' ';