mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Avoid questionable use of strlen(), strcpy(), and strcat().
This commit is contained in:
parent
f89a4cc459
commit
4821c2c6ed
@ -865,11 +865,13 @@ syncrepl_entry(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
op->ors_filterstr.bv_len = strlen("entryUUID=") + syncUUID->bv_len;
|
op->ors_filterstr.bv_len = (sizeof("entryUUID=")-1) + syncUUID->bv_len;
|
||||||
op->ors_filterstr.bv_val = (char *) sl_malloc( op->ors_filterstr.bv_len + 1,
|
op->ors_filterstr.bv_val = (char *) sl_malloc(
|
||||||
op->o_tmpmemctx );
|
op->ors_filterstr.bv_len + 1, op->o_tmpmemctx );
|
||||||
strcpy( op->ors_filterstr.bv_val, "entryUUID=" );
|
AC_MEMCPY( op->ors_filterstr.bv_val, "entryUUID=", sizeof("entryUUID=")-1 );
|
||||||
strcat( op->ors_filterstr.bv_val, syncUUID->bv_val );
|
AC_MEMCPY( &op->ors_filterstr.bv_val[sizeof("entryUUID=")-1],
|
||||||
|
syncUUID->bv_val, syncUUID->bv_len );
|
||||||
|
op->ors_filterstr.bv_val[op->ors_filterstr.bv_len] = '\0';
|
||||||
|
|
||||||
si->e = e;
|
si->e = e;
|
||||||
si->syncUUID_ndn = NULL;
|
si->syncUUID_ndn = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user