diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-08-29 23:20:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:57 -0500 |
commit | fe1ee4494e172ea8045b4847806241e9dfaefeef (patch) | |
tree | 77999738a38429c06f43fb8437173fadc9c73951 /source4/lib/ldb | |
parent | 33f4328c69a3a06e859b9180f5f509faec37aeee (diff) | |
download | samba-fe1ee4494e172ea8045b4847806241e9dfaefeef.tar.gz samba-fe1ee4494e172ea8045b4847806241e9dfaefeef.tar.bz2 samba-fe1ee4494e172ea8045b4847806241e9dfaefeef.zip |
r9766: Prevent erroneous OOM message
ldb_dup_val() sets out->data to NULL if in->length == 0
(This used to be commit 7ecb6988e74f4273b2ca3ea76562117e1be54b08)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/common/attrib_handlers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/attrib_handlers.c b/source4/lib/ldb/common/attrib_handlers.c index da2d945419..412146360c 100644 --- a/source4/lib/ldb/common/attrib_handlers.c +++ b/source4/lib/ldb/common/attrib_handlers.c @@ -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; } |