git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cb3b2d
)
r7516: make sure binary decoding gives us something we can run string functions on
author
Andrew Tridgell
<tridge@samba.org>
Mon, 13 Jun 2005 05:56:46 +0000
(
05:56
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:18:03 +0000
(13:18 -0500)
(This used to be commit
9913ab2550fae465c7a66fe7fa3a36a65b25b358
)
source4/lib/ldb/common/ldb_parse.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/common/ldb_parse.c
b/source4/lib/ldb/common/ldb_parse.c
index 80841054c6fab46901f880ee6f6205cc634df54f..40e83f01bd623f725237f96b635290b167dc7d12 100644
(file)
--- a/
source4/lib/ldb/common/ldb_parse.c
+++ b/
source4/lib/ldb/common/ldb_parse.c
@@
-136,7
+136,7
@@
struct ldb_val ldb_binary_decode(TALLOC_CTX *ctx, const char *str)
struct ldb_val ret;
int slen = strlen(str);
- ret.data = talloc_size(ctx, slen);
+ ret.data = talloc_size(ctx, slen
+1
);
ret.length = 0;
if (ret.data == NULL) return ret;
@@
-155,6
+155,7
@@
struct ldb_val ldb_binary_decode(TALLOC_CTX *ctx, const char *str)
}
}
ret.length = j;
+ ((uint8_t *)ret.data)[j] = 0;
return ret;
}