1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-23 11:17:06 +03:00

r9766: Prevent erroneous OOM message

ldb_dup_val() sets out->data to NULL if in->length == 0
(This used to be commit 7ecb6988e74f4273b2ca3ea76562117e1be54b08)
This commit is contained in:
Jelmer Vernooij 2005-08-29 23:20:40 +00:00 committed by Gerald (Jerry) Carter
parent 33f4328c69
commit fe1ee4494e

View File

@ -38,7 +38,7 @@ int ldb_handler_copy(struct ldb_context *ldb, void *mem_ctx,
const struct ldb_val *in, struct ldb_val *out)
{
*out = ldb_val_dup(mem_ctx, in);
if (out->data == NULL) {
if (in->length > 0 && out->data == NULL) {
ldb_oom(ldb);
return -1;
}