]> git.sur5r.net Git - openldap/commitdiff
Fix SAFEMEMCPY bug from revision 1.32 in idl_insert()
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 3 Sep 1999 11:01:18 +0000 (11:01 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Fri, 3 Sep 1999 11:01:18 +0000 (11:01 +0000)
servers/slapd/back-ldbm/idl.c

index 4f61a0b472337326b7007cc7b01176441ee9a505..e47c8cfa5b38ceacb41a89d79ae6f5092c19c90a 100644 (file)
@@ -659,8 +659,8 @@ idl_insert( ID_BLOCK **idl, ID id, unsigned int maxids )
        }
 
        /* make a slot for the new id */
-       SAFEMEMCPY( &ID_BLOCK_ID(*idl, i), &ID_BLOCK_ID(*idl, i+1), 
-               ID_BLOCK_NIDS(*idl) - i );
+       SAFEMEMCPY( &ID_BLOCK_ID(*idl, i+1), &ID_BLOCK_ID(*idl, i),
+                   (ID_BLOCK_NIDS(*idl) - i) * sizeof(ID) );
 
        ID_BLOCK_ID(*idl, i) = id;
        ID_BLOCK_NIDS(*idl)++;