]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Fix the charset_pull routine
authorVolker Lendecke <vl@samba.org>
Mon, 6 Sep 2010 13:13:48 +0000 (15:13 +0200)
committerKarolin Seeger <kseeger@samba.org>
Sat, 25 Sep 2010 12:55:04 +0000 (14:55 +0200)
In the push routine we do the SVAL, so we should do the SSVAL here.

Fix bug #7531 (3.5.3 unusable on solaris 10).

lib/util/charset/charset.h

index 2c8aa41ad5c78287c4ce627b4664dfaacfbef0b9..c9425ef7301dea791e64b97f0e74939d380da9d0 100644 (file)
@@ -242,7 +242,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;                                                                 \