git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fce829
)
ldb:ldb_msg_add_steal_string - prevent also there the addition of strings with length 0
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Mon, 31 May 2010 20:22:37 +0000
(22:22 +0200)
committer
Matthias Dieter Wallnöfer
<mdw@samba.org>
Mon, 31 May 2010 20:43:28 +0000
(22:43 +0200)
source4/lib/ldb/common/ldb_msg.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/common/ldb_msg.c
b/source4/lib/ldb/common/ldb_msg.c
index 0322446033951ecc6a39b404e81a1fd04825774d..2cfc4499861c85a05de2cd4ff5d14b31b5974a43 100644
(file)
--- a/
source4/lib/ldb/common/ldb_msg.c
+++ b/
source4/lib/ldb/common/ldb_msg.c
@@
-255,6
+255,11
@@
int ldb_msg_add_steal_string(struct ldb_message *msg,
val.data = (uint8_t *)str;
val.length = strlen(str);
+ if (val.length == 0) {
+ /* allow empty strings as non-existent attributes */
+ return LDB_SUCCESS;
+ }
+
return ldb_msg_add_steal_value(msg, attr_name, &val);
}