git.samba.org
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
r9766: Prevent erroneous OOM message
[samba.git]
/
source
/
lib
/
ldb
/
common
/
attrib_handlers.c
diff --git
a/source/lib/ldb/common/attrib_handlers.c
b/source/lib/ldb/common/attrib_handlers.c
index da2d9454190ca997d156f37194f7932abf2ee288..412146360cc3dd388a08f4d0fc1a6dab49905e29 100644
(file)
--- a/
source/lib/ldb/common/attrib_handlers.c
+++ b/
source/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;
}