From e3a01483287ced40eca8a8eccf13c5b6bac3bf1c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 18 Oct 2003 02:33:15 +0000 Subject: [PATCH] Fix modify attrs= overflow bug --- servers/slapd/modify.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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++ = ' '; -- 2.39.5