git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a70b52b
)
r9766: Prevent erroneous OOM message
author
Jelmer Vernooij
<jelmer@samba.org>
Mon, 29 Aug 2005 23:20:40 +0000
(23:20 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:34:57 +0000
(13:34 -0500)
ldb_dup_val() sets out->data to NULL if in->length == 0
source/lib/ldb/common/attrib_handlers.c
patch
|
blob
|
history
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;
}