git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbfb42c
)
s3: Fix the charset_pull routine (bug 7531)
author
Volker Lendecke
<vl@samba.org>
Mon, 6 Sep 2010 13:13:48 +0000
(15:13 +0200)
committer
Volker Lendecke
<vl@samba.org>
Mon, 20 Sep 2010 04:33:25 +0000
(21:33 -0700)
In the push routine we do the SVAL, so we should do the SSVAL here.
lib/util/charset/charset.h
patch
|
blob
|
history
diff --git
a/lib/util/charset/charset.h
b/lib/util/charset/charset.h
index 68907aa59303d4a05236311d73d05ae5e104ccf6..bd08f7efd9dc3ea5e5dbe7aa0fe1867cfee37509 100644
(file)
--- a/
lib/util/charset/charset.h
+++ b/
lib/util/charset/charset.h
@@
-266,7
+266,7
@@
static size_t CHARSETNAME ## _pull(void *cd, const char **inbuf, size_t *inbytes
char **outbuf, size_t *outbytesleft) \
{ \
while (*inbytesleft >= 1 && *outbytesleft >= 2) { \
-
*(uint16*)(*outbuf) = to_ucs2[((unsigned char*)(*inbuf))[0]];
\
+
SSVAL(*outbuf, 0, to_ucs2[((unsigned char*)(*inbuf))[0]]);
\
(*inbytesleft) -= 1; \
(*outbytesleft) -= 2; \
(*inbuf) += 1; \