summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-01-10 11:47:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:37:24 -0500
commitc6ccfeb9cb78a95048ce0d91317b5948ae4ca46e (patch)
tree0b68d5d71738658bb28bf723ed2a516ff1fd07da /source4
parent2ffd009a74f0c5b1705e29b8cda99b16378b8f46 (diff)
downloadsamba-c6ccfeb9cb78a95048ce0d91317b5948ae4ca46e.tar.gz
samba-c6ccfeb9cb78a95048ce0d91317b5948ae4ca46e.tar.bz2
samba-c6ccfeb9cb78a95048ce0d91317b5948ae4ca46e.zip
r20649: fixed strlower_talloc() and strupper_talloc() to end with right size,
so talloc_append_string() works (This used to be commit 0d36b036b381d4f81a22ce31066d89932d73597b)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/charset/util_unistr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/charset/util_unistr.c b/source4/lib/charset/util_unistr.c
index 7e1b08ca3e..e2c9015d1d 100644
--- a/source4/lib/charset/util_unistr.c
+++ b/source4/lib/charset/util_unistr.c
@@ -510,6 +510,9 @@ _PUBLIC_ char *strlower_talloc(TALLOC_CTX *ctx, const char *src)
dest[size] = 0;
+ /* trim it so talloc_append_string() works */
+ dest = talloc_realloc_size(ctx, dest, size+1);
+
return dest;
}
@@ -549,6 +552,9 @@ _PUBLIC_ char *strupper_talloc(TALLOC_CTX *ctx, const char *src)
dest[size] = 0;
+ /* trim it so talloc_append_string() works */
+ dest = talloc_realloc_size(ctx, dest, size+1);
+
return dest;
}