summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-02-26 05:11:06 +0000
committerAndrew Tridgell <tridge@samba.org>2001-02-26 05:11:06 +0000
commitd33b294b9aa6059bd0831a264b427108bd2d5db2 (patch)
treee16db6c437227fe92416dcc092056f9394730009 /source3
parentf9405ab8f921753f1de9490f37b18ccfcd3ab370 (diff)
downloadsamba-d33b294b9aa6059bd0831a264b427108bd2d5db2.tar.gz
samba-d33b294b9aa6059bd0831a264b427108bd2d5db2.tar.bz2
samba-d33b294b9aa6059bd0831a264b427108bd2d5db2.zip
fixed a bug in non-terminated unicode strings with clistr_pull()
(This used to be commit 339bcfd05d3260a123ccf3c06429da6bfe621f74)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clistr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/clistr.c b/source3/libsmb/clistr.c
index e07b4d5a63..52137d9f78 100644
--- a/source3/libsmb/clistr.c
+++ b/source3/libsmb/clistr.c
@@ -140,7 +140,7 @@ int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len
len = strlen(dest)*2 + 2;
} else {
int i, c;
- if (dest_len < src_len) src_len = dest_len;
+ if (dest_len*2 < src_len) src_len = 2*dest_len;
for (i=0; i < src_len; i += 2) {
c = SVAL(src, i);
*dest++ = c;