summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMatthew Chapman <matty@samba.org>1999-04-08 05:34:11 +0000
committerMatthew Chapman <matty@samba.org>1999-04-08 05:34:11 +0000
commite6ea3cc46313a53eaac6bf789f00a91bc02f7a3f (patch)
tree53280b58610456a4085895343858073b491a0538 /source3
parentab0d0a6f4e55d85c32757d3dda3bf40c339d4a23 (diff)
downloadsamba-e6ea3cc46313a53eaac6bf789f00a91bc02f7a3f.tar.gz
samba-e6ea3cc46313a53eaac6bf789f00a91bc02f7a3f.tar.bz2
samba-e6ea3cc46313a53eaac6bf789f00a91bc02f7a3f.zip
Fix for endianness problem reported by Edan Idzerda <edan@mtu.edu>. A
BUFFER2 is really a "unibuf" in my terminology and we should treat it as such. (This used to be commit 7ef76320b79b3ca4e04dcf809ac6388b6c47a3d8)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_unistr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 01ec262f60..4e7872021b 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -203,7 +203,7 @@ uint32 buffer2_to_uint32(const BUFFER2 *str)
{
if (str->buf_len == 4)
{
- const char *src = (const char*)str->buffer;
+ const char *src = str->buffer;
return IVAL(src, 0);
}
else
@@ -220,7 +220,7 @@ uint32 buffer2_to_uint32(const BUFFER2 *str)
void buffer2_to_multistr(char *dest, const BUFFER2 *str, int maxlen)
{
char *destend;
- const uint16 *src;
+ const char *src;
int len;
register uint16 c;
@@ -232,6 +232,7 @@ void buffer2_to_multistr(char *dest, const BUFFER2 *str, int maxlen)
{
c = *(src++);
*(dest++) = (c == 0) ? ' ' : (char)c;
+ src++;
}
*dest = 0;