X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fad.c;h=db1eb06d2a6038e384e6bd0b75718172cc557ab8;hb=49b0985c88ea6836a24c314aea2cb2dd0d129544;hp=7d83de93303529d6380d7bb2070e3d15297f05a9;hpb=e374c580f2db2988ef777fb4c0b01cd66518a770;p=openldap
diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c
index 7d83de9330..db1eb06d2a 100644
--- a/servers/slapd/ad.c
+++ b/servers/slapd/ad.c
@@ -1,9 +1,18 @@
+/* ad.c - routines for dealing with attribute descriptions */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software .
+ *
+ * Copyright 1998-2003 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * .
*/
-/* ad.c - routines for dealing with attribute descriptions */
#include "portable.h"
@@ -222,10 +231,10 @@ int slap_bv2ad(
} else if ( rc > 0 ||
( rc == 0 && (unsigned)optlen > tags[i].bv_len ))
{
- AC_MEMCPY( &tags[i+1], &tags[i],
- (ntags-i)*sizeof(struct berval) );
- tags[i].bv_val = opt;
- tags[i].bv_len = optlen;
+ AC_MEMCPY( &tags[i+2], &tags[i+1],
+ (ntags-i-1)*sizeof(struct berval) );
+ tags[i+1].bv_val = opt;
+ tags[i+1].bv_len = optlen;
goto done;
}
}
@@ -518,6 +527,7 @@ int ad_inlist(
&attrs->an_desc->ad_tags ) ) {
return 1;
}
+ continue;
}
/*