]> git.sur5r.net Git - openldap/commitdiff
Fix modify attrs= overflow bug
authorKurt Zeilenga <kurt@openldap.org>
Sat, 18 Oct 2003 02:33:15 +0000 (02:33 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 18 Oct 2003 02:33:15 +0000 (02:33 +0000)
servers/slapd/modify.c

index ac412159c136b3d8288c5c8099558885a8c22990..dda14a3127b11572f8a322739ca9e1d6ca370d91 100644 (file)
@@ -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++ = ' ';