diff options
author | Karolin Seeger <kseeger@samba.org> | 2008-11-17 14:02:47 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-11-17 14:02:47 +0100 |
commit | f50add3d8cbe3f3cba7e75746a9cc39907501146 (patch) | |
tree | 89f590a419a0708bb40a56386294693f1cb80dbd | |
parent | 8c19fcad5d8f9a765b6257c6cc0f25998a46f00c (diff) | |
download | samba-f50add3d8cbe3f3cba7e75746a9cc39907501146.tar.gz samba-f50add3d8cbe3f3cba7e75746a9cc39907501146.tar.xz samba-f50add3d8cbe3f3cba7e75746a9cc39907501146.zip |
Revert "Fix bug 5826 - Directory/Filenames get truncated when 3.2.0 client acesses old server."
This reverts commit f3b0e219f1a7660ff275db701935eecbe053fa25.
-rw-r--r-- | source/lib/charcnv.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index eec7ae30afd..cea234fadd1 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -1209,21 +1209,7 @@ static size_t pull_ascii_base_talloc(TALLOC_CTX *ctx, if (dest_len && dest) { /* Did we already process the terminating zero ? */ if (dest[dest_len-1] != 0) { - size_t size = talloc_get_size(dest); - /* Have we got space to append the '\0' ? */ - if (size <= dest_len) { - /* No, realloc. */ - dest = TALLOC_REALLOC_ARRAY(ctx, dest, char, - dest_len+1); - if (!dest) { - /* talloc fail. */ - dest_len = (size_t)-1; - return 0; - } - } - /* Yay - space ! */ - dest[dest_len] = '\0'; - dest_len++; + dest[dest_len-1] = 0; } } else if (dest) { dest[0] = 0; |