mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
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)
This commit is contained in:
parent
ab0d0a6f4e
commit
e6ea3cc463
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user