diff options
Diffstat (limited to 'source4/lib/charset')
-rw-r--r-- | source4/lib/charset/util_unistr.c | 6 |
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; } |